I am working with a Java Web application(spring mvc) connecting to a Mysql database .
When i left my application overnight and there is no request to process during the night, in the morning it was throwing java.sql.SQLException: Communication link failure: java.net.SocketException, underlying cause: Software caused connection abort: recv failed
error.
i am using Apache JDBC connection pool i.e. in my Spring config file.
I did some research and found that the real cause of the problem was that database timed out the connection when left idle and when Java application tries to connect to the database using those stale connection it throws
java.sql.SQLException: Communication link failure:
java.net.SocketException, underlying cause: Software caused connection abort: recv failed error.