Announcement

Collapse
No announcement yet.

Getting SQL connection failures pretty often

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting SQL connection failures pretty often

    My log file is filled with many SQL communication failures like:

    Code:
    Feb 1, 2013 9:01:50 AM com.openexchange.log.internal.LoggerTask call
    SEVERE: Logged at: com.openexchange.exception.OXException.log(OXException.java:544)
     com.openexchange.ajp13.remoteAddress=1.1.1.1
     com.openexchange.ajp13.remotePort=39177
     com.openexchange.database.schema=oxdatabase_7
     com.openexchange.session.clientId=com.openexchange.ox.gui.dhtml
     com.openexchange.session.contextId=315
     com.openexchange.session.userId=4
    
     USR-0005 Categories=SERVICE_DOWN Message='Cannot get database connection.' exceptionID=-622917891-13006
    USR-0005 Categories=SERVICE_DOWN Message='Cannot get database connection.' exceptionID=-622917891-13006
            at com.openexchange.exception.OXExceptionFactory.create(OXExceptionFactory.java:156)
            at com.openexchange.groupware.ldap.LdapExceptionCode.create(LdapExceptionCode.java:164)
            at com.openexchange.groupware.ldap.RdbUserStorage.getUser(RdbUserStorage.java:277)
            at com.openexchange.groupware.ldap.UserFactory.load(UserFactory.java:83)
            at com.openexchange.groupware.ldap.UserFactory.load(UserFactory.java:59)
            at com.openexchange.caching.dynamic.Refresher.refresh(Refresher.java:289)
            at com.openexchange.caching.dynamic.Refresher.refresh(Refresher.java:190)
            at com.openexchange.caching.dynamic.Refresher.refresh(Refresher.java:128)
            at com.openexchange.groupware.ldap.UserReloader.<init>(UserReloader.java:84)
            at com.openexchange.groupware.ldap.CachingUserStorage.createProxy(CachingUserStorage.java:176)
            at com.openexchange.groupware.ldap.CachingUserStorage.getUser(CachingUserStorage.java:171)
            at com.openexchange.ajax.SessionServlet.getSession(SessionServlet.java:588)
            at com.openexchange.ajax.SessionServlet.getSession(SessionServlet.java:547)
            at com.openexchange.ajax.SessionServlet.initializeSession(SessionServlet.java:218)
            at com.openexchange.ajax.SessionServlet.service(SessionServlet.java:276)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.openexchange.ajp13.coyote.AjpProcessor.process(AjpProcessor.java:908)
            at com.openexchange.ajp13.coyote.sockethandler.CoyoteTask.call(CoyoteTask.java:185)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.runTask(CustomThreadPoolExecutor.java:798)
            at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:825)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: DBP-0006 Categories=ERROR Message='Problem with executing SQL: Communications link failure
    
    
    
    USR-0005 Categories=SERVICE_DOWN Message='Cannot get database connection.' exceptionID=-622917891-13006
    USR-0005 Categories=SERVICE_DOWN Message='Cannot get database connection.' exceptionID=-622917891-13006
            at com.openexchange.exception.OXExceptionFactory.create(OXExceptionFactory.java:156)
            at com.openexchange.groupware.ldap.LdapExceptionCode.create(LdapExceptionCode.java:164)
            at com.openexchange.groupware.ldap.RdbUserStorage.getUser(RdbUserStorage.java:277)
            at com.openexchange.groupware.ldap.UserFactory.load(UserFactory.java:83)
            at com.openexchange.groupware.ldap.UserFactory.load(UserFactory.java:59)
            at com.openexchange.caching.dynamic.Refresher.refresh(Refresher.java:289)
            at com.openexchange.caching.dynamic.Refresher.refresh(Refresher.java:190)
            at com.openexchange.caching.dynamic.Refresher.refresh(Refresher.java:128)
            at com.openexchange.groupware.ldap.UserReloader.<init>(UserReloader.java:84)
            at com.openexchange.groupware.ldap.CachingUserStorage.createProxy(CachingUserStorage.java:176)
            at com.openexchange.groupware.ldap.CachingUserStorage.getUser(CachingUserStorage.java:171)
            at com.openexchange.ajax.SessionServlet.getSession(SessionServlet.java:588)
            at com.openexchange.ajax.SessionServlet.getSession(SessionServlet.java:547)
            at com.openexchange.ajax.SessionServlet.initializeSession(SessionServlet.java:218)
            at com.openexchange.ajax.SessionServlet.service(SessionServlet.java:276)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.openexchange.ajp13.coyote.AjpProcessor.process(AjpProcessor.java:908)
            at com.openexchange.ajp13.coyote.sockethandler.CoyoteTask.call(CoyoteTask.java:185)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.runTask(CustomThreadPoolExecutor.java:798)
            at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:825)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: DBP-0006 Categories=ERROR Message='Problem with executing SQL: Communications link failure
    
    The last packet successfully received from the server was 58,227 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.' exceptionID=-622917891-13005
            at com.openexchange.database.DBPoolingExceptionCodes.create(DBPoolingExceptionCodes.java:224)
            at com.openexchange.database.internal.ContextDatabaseLifeCycle.loadPoolData(ContextDatabaseLifeCycle.java:182)
            at com.openexchange.database.internal.ContextDatabaseLifeCycle.create(ContextDatabaseLifeCycle.java:102)
            at com.openexchange.database.internal.Pools.getPool(Pools.java:108)
            at com.openexchange.database.internal.ReplicationMonitor$1.get(ReplicationMonitor.java:101)
            at com.openexchange.database.internal.ReplicationMonitor.checkActualAndFallback(ReplicationMonitor.java:155)
            at com.openexchange.database.internal.ReplicationMonitor.checkActualAndFallback(ReplicationMonitor.java:145)
            at com.openexchange.database.internal.DatabaseServiceImpl.get(DatabaseServiceImpl.java:95)
            at com.openexchange.database.internal.DatabaseServiceImpl.getReadOnly(DatabaseServiceImpl.java:156)
            at com.openexchange.databaseold.Database.get(Database.java:115)
            at com.openexchange.server.impl.DBPool.pickup(DBPool.java:68)
            at com.openexchange.groupware.ldap.RdbUserStorage.getUser(RdbUserStorage.java:275)
            ... 20 more
    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet successfully received from the server was 58,227 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.
            at sun.reflect.GeneratedConstructorAccessor88.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
            at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
            at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3589)
            at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3478)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4019)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
            at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
            at com.openexchange.database.internal.ContextDatabaseLifeCycle.loadPoolData(ContextDatabaseLifeCycle.java:166)
            ... 30 more
    Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
            at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039)
            at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3489)
            ... 38 more

    This is a pretty serious error because this error happens user tries to login & everything goes fine in the second run.

    Searching on google said that it's because of mysql closing the idle connections. Can anyone help me in solving this?

    My configdb.properties looks like: http://sprunge.us/bBFH

  • #2
    Are you sure "readUrl=jdbc:mysql://localhost:13306/configdb" is correct? Or perhaps a typo?

    Comment

    Working...
    X