I have a java web application deployed in glassfish. This application interacts with Mariadb server. Suddenly, the app stops working. I'm checking the app.log and glassfish server log and I have the following results:
app.log
Could not open JDBC Connection for transaction; nested exception is java.sql.SQLNonTransientConnectionException: Could not send query: Last packet not finished
server.log
### The error may exist in file [/opt/glassfish3/glassfish/domains/domain1/applications/exampleApp/WEB-INF/class/model/xml/ParameterMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT NOW();
### Cause: java.sql.SQLNonTransientConnectionException: Could not send query: Last packet not finished
; SQL []; Could not send query: Last packet not finished; nested exception is java.sql.SQLNonTransientConnectionException: Could not send query: Last packet not finished|#]
The application repeats same database operations every 5 minutes.
I tried to reload the application by glassfish but it didn't work. The only way is restarting the server and it works but not for long.
What is happening for this case? or What can I do?