Skip to content

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

View some of the Frequently Asked Questions to our support staff. Included are some tips and tricks making this forum ideal for users getting started with GoAnywhere MFT. Note: Users can reply to existing topics but only our support staff can add new topics to this forum.
  • Support_Andy Offline
  • Posts: 8
  • Joined: Thu Feb 16, 2017 11:03 am

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

Post 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.