JDBC lose connection

when webMethods run sometime JDBC adapter lose connection like this

Unable to get connection state.
Io exception: Connection reset by peer: socket write error

what we do …?

What happened is: the JDBC Adapter is trying to write data to a socket, but the other side (the peer) already closed the socket. The adapter is not able to connect to the database with this connection.

In most cases this is caused by a timeout. This could be a timeout of your database. But we’ve seen it also when there’s a firewall between the IS and the database. In that scenario it could be the firewall which has timed out.

So what you can try is to tune the timeouts of the DB, firewall and JDBC Connection.

Please note that the JDBC adapter tries to reconnect automatically. The reason why this messages comes up is so you can create an integration in a way to catch these exceptions

The following scenario could be happening:

  • the setting for min jdbc connection pool is set higher than 0 (e.g. 1)
  • your database was unavailable (e.g. due to planned downtime)
  • the min amount of connections will always be in the pool, but one or all of them might be bad (because of the downtime).
  • the next connection request will give the exception you’re seeing, remove the bad connection from the pool and create a new connection.

You can resolve this by decreasing the min connection pool setting to 0.

I hope this helps.
Don’t hesitate to contact support in case you need further assistance.

Eric Rietveld
webMethods Technical Services

Thank Eric, i can try u solusion.
i have one question again in JDBC pool connection how long maximal setting Block Timeout, Expire Timeout

Hi Users,

Can any one respond on this old thread and share common timeout settings being used:

JDBC pool connection how long maximal setting Block Timeout, Expire Timeout??

-RMG