Harweb hang with Tomcat error "No buffer space available (maximum connections reached) JVM_Bind

Document ID : KB000049606
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

A Harweb hang occurred and the Tomcat server log reported the error:

..created pool of size 5 com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind

How do we correct this error?

Solution:

When the error occurs do netstat -a from a command prompt to get a list of all the active sockets. See if there are a large number stuck in states such as CLOSE_WAIT and TIME_WAIT.

Stopping and Restarting Tomcat usually fixes this.

For Windows see: http://support.microsoft.com/kb/196271

The database administrator may need to explicitly close some idle connections to the database.