I am getting a 'broken pipe' exception when the server is left running for a long time without any http requests. Upon some investigation I found that this exception occures because the server closes its database connection and occurs when a client requests resources when the connection is close. To fix this I added the following to the jdbc conenction url
You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
Thanks for the help , I fixed this issue by adding the following to the
And making sure all transactions are committed, rolled back in case of exceptions and sessions are closed after use.