From: | "Ed Blackmore" <me(at)edblackmore(dot)net> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar) |
Date: | 2006-04-19 17:21:58 |
Message-ID: | 44467FC6.27310.20B6E57@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi Markus,
Thankyou for your assistance.
> So it seems that the network connection breaks from time to time
> Independently from making your application more robust, you might want
> to put some research into that.
Yes, I put a minutely ping script in place, which wasn't able to
detect a failure at a time when the connection was lost. The servers
are dedicated server (installed and hosted by another company), so
I've been trying to detect any outages to report to them.
> If you're using the tomcat connection pooling, my proposed solution
> there might help you
Thanks, I tried the following settings based on your idea looking for
similar tomcat settings on google:
In webapps/ourapp/META-INF/context.ml, adding:
<parameter>
<name>testOnBorrow</name>
<value>true</value>
</parameter>
<parameter>
<name>testOnReturn</name>
<value>true</value>
</parameter>
<parameter>
<name>validationQuery</name>
<value>select version()</value>
</parameter>
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?
Regards,
Ed
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2006-04-20 01:08:32 | Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar) |
Previous Message | Guy Rouillier | 2006-04-18 20:19:16 | Re: stored function, multiple queries, best practices |