| Connection pooling and network timeouts [message #648563] |
Thu, 13 January 2011 09:27  |
William Korb Messages: 7 Registered: January 2011 |
Junior Member |
|
|
Hello,
I am using the connection pooling that is built in to EL in an app that runs on a non-JEE web server. We are seeing a problem where a network firewall is forcibly closing idle connections after an hour, and while EL resubmits the query, it takes 15 minutes for the timeout and retry to occur.
My question is this: is there a way I can tell the EMF to closed pooled connections after they have been idle for a period of time (e.g., 30 minutes) so as to avoid the firewall's non-graceful closing of the connections?
Thanks,
Bill
|
|
|
|
| Re: Connection pooling and network timeouts [message #648588 is a reply to message #648565] |
Thu, 13 January 2011 10:27   |
James Sutherland Messages: 1834 Registered: July 2009 |
Senior Member |
|
|
EclipseLink does not support any keepAlive in its internal connection pooling. You can either create your own background thread to ping the EclipseLink connection pool, or use a third party connection pool that supports a keepAlive (maybe Oracle UCP).
You can also try setting a timeout on your queries to decrease the timeout.
James : Wiki : Book : Blog
|
|
|
|
|
| Re: Connection pooling and network timeouts [message #685884 is a reply to message #685873] |
Mon, 20 June 2011 10:04   |
James Sutherland Messages: 1834 Registered: July 2009 |
Senior Member |
|
|
When do you get this error? How many connections have you configured your EclipseLink connection pool with, and how many connections are allowed on your database?
The MySQL error seems to indicate that you have used too many connections than allowed. So either decrease your connection pool size, or increase you MySQL connection limit.
Also what version of EclipseLink are you using?
James : Wiki : Book : Blog
|
|
|
|
|
| Re: Connection pooling and network timeouts [message #688238 is a reply to message #687949] |
Fri, 24 June 2011 04:42  |
LA Messages: 13 Registered: June 2011 |
Junior Member |
|
|
Got 2 Gb of RAM on a 2 CPU virtual machine..
config:
<!--
<property name="eclipselink.jdbc.read-connections.min" value="30"/>
<property name="eclipselink.jdbc.read-connections.max" value="150"/>
<property name="eclipselink.jdbc.read-connections.shared" value="true"/>
<property name="eclipselink.jdbc.write-connections.min" value="10"/>
<property name="eclipselink.jdbc.write-connections.max" value="80"/>
-->
<!-- Now I'm using this...-->
<property name="eclipselink.jdbc.connections.min" value="50" />
<property name="eclipselink.jdbc.connections.max" value="150" />
<property name="eclipselink.jdbc.connections.initial" value="25" />
|
|
|
Powered by
FUDForum. Page generated in 0.07115 seconds