Observations

When using the MySQL database connection reports errors in ./logs/YYYY_MM_DD.stderrout.log like this:

2017-02-23 20:20:08,051 WARN  qtp1973336893-21 o.h.e.j.s.SqlExceptionHelper                 - SQL Error: -1, SQLState: 08
2017-02-23 20:20:08,051 ERROR qtp1973336893-21 o.h.e.j.s.SqlExceptionHelper                 - Could not send query: Connection reset by peer: socket write error
2017-02-23 20:20:08,052 INFO  qtp1973336893-21 c.s.j.c.JOCDefaultResponse                   - 
REQUEST: ./orders/overview/summary
PARAMS: {"jobschedulerId":"apmacwin_4444","orders":[],"excludeOrders":[],"compact":false,"processingStates":[],"types":[],"dateFrom":"2017-02-22T23:00:00.000Z","dateTo":"2017-02-23T23:00:00.000Z","folders":[],"limit":10000,"historyStates":[]}
USER: root
2017-02-23 20:20:08,052 ERROR qtp1973336893-21 c.s.j.c.JOCDefaultResponse                   - javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection

The first error message "Connection reset by peer: socket write error" is caused by the MySQL DBMS.

The second error message "Unable to acquire JDBC Connection" is a following error that is causes by the Hibernate database access layer.

Explanations

  • A common cause of this problem is the size of the MySLQ communication buffer being too small.
  • This buffer frequently ships with a default value of 4 MB which is too small for a number of applications including JobScheduler.
  • A practical value includes e.g. 50 MB or more.
  • This buffer can be configured by the max_allowed_packet setting, e.g. in my.ini like this:

    [mysqld]

    max_allowed_packet=50M

  • No labels