java - Network error using eclipselink with internal connection pool (solved) -


This post is just about helping other people with similar problems.

We have configured the default pool to use the minimum 1 and maximum of 10 connections to use JavaS with EclipseSlot with its internal connection pool feature. We have faced the following exceptions on many sessions after installing this application on windows terminal server and running 50 yug passes for stress testing. Serious []: [Eclipse-Link 4002] Eclipse Persistence Service - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Network Error IOException: A buffer Location is not available (Maximum connection reached?): Connect

We use jtds as drivers to connect to MS SQL Server. Using the netstate, it was shown that all the dynamically available TCP ports (more than 16,000) were used by the connection of SQL Server at state TIMED_WAIT.

Does jtds or EL leak ports or connections? No.

It has been found that our pool configuration problem was that our application often requires multiple connections for asynchronous requests. Only a permanent connection (minimum) in the pool, EL opened up to 10 connections (max), but immediately closed those connections immediately after executing a statement. Jtds use socket to communicate with SQL Server, until the port for the next connection is not available, it requires about 4 minutes (TCP_time_white_inverver) to close the socket. Slowly but surely the terminal server went out of the available ports.

Solution: Hotfix: We have configured our pool to use the same value for the minimum / maximum so that dynamically prevent EL from opening and closing the connection.

More Extended: We have an external connection pool, which allows us to define a pool for passive connections and connections with idle time eg dBCP minEvictableIdleTimeMillis.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -