hmis-tools / hmis-api-server

Version 2 of OpenHMIS
Mozilla Public License 2.0
15 stars 11 forks source link

Occasional 500 error until server is restarted #44

Open cecilia-donnelly opened 8 years ago

cecilia-donnelly commented 8 years ago

At certain intervals, all requests to the HMIS server return 500 errors (often of the form org.hibernate.exception.JDBCConnectionException: could not prepare statement or similar), until an administrator runs sudo tomcat7 service restart. I don't know why this happens, though @slifty might. As a workaround, we could run a restart cron job once a day.

This issue is just to remind us to find and solve the real problem here.

kfogel commented 7 years ago

We just noticed that when you do mvn tomcat7.redeploy, the /var/lib/tomcat7/logs/catalina.out log file shows a couple of problems that might be related to this issue:

SEVERE: The web application [/openhmis] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

SEVERE: The web application [/openhmis] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.