Page 1 of 1

SQL Read Timed Out, Connection reset by peer: socket write error, java.sql.SQLException: Already Closed

Posted: Thu Feb 14, 2019 10:10 am
by Support_Andy
Question:
I am receiving errors in the application log stating "SQL Read Timed Out", "Connection reset by peer: socket write error", and "java.sql.SQLException: Already Closed".

Answer:
These errors are indicative of the back-end database server handing out a stale connection in the pool that GoAnywhere is using. We can check for valid connections by adding two properties to the database.xml file located in the <install directory>/config folder:

<entry key="testOnBorrow">true</entry>

<entry key="validationQuery">SELECT 1</entry>


Once this file has been edited you will need to restart the GoAnywhere service for these to take effect.

Ideally, the DBA team will work to minimize the amount of stale connections that are staying in their pool, but this client side solution should help the application ensure it is getting clean connections.