Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar)
От | Markus Schaber |
---|---|
Тема | Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar) |
Дата | |
Msg-id | 44473C52.2040105@logix-tt.com обсуждение исходный текст |
Ответ на | Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar) ("Ed Blackmore" <me@edblackmore.net>) |
Список | pgsql-jdbc |
Hi, Ed, Ed Blackmore wrote: > I wasn't able to nicely induce the error through our firewall or > taking connections down, but restarting postgresql did lead to a > broken pipe error. The above fix didn't help in this scenerio. > > Reading other posts it seems that the jdbc driver is not expected to > reopen connections, therefore it doesn't seem using a newer version > will help. Given that our tomcat app doesn't reconnect to a > postgresql db after it (the database) has been restarted, is it > correct I need to work with the app developer as to how we use the > connection pool, or are there configuration changes that can help? Yes, that's true. My workaround protects against a pool handing out broken connections[1], but the Application still must get a fresh connection ittself. Most JSP pages and Servlets I've seen get such a connection on every incoming request, most Servlets I've written refresh their connection when an appropriate SQL exception happens. I think that this is the way your app has to be modified - refresh the SQL connection in case of an Exception. HTH, Markus [1] Before java 1.6, the pool has no (easy and portable) way to tell whether a connection is still valid. -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
В списке pgsql-jdbc по дате отправления: