My application is using MySQL Server. When i try to launch it on Mac OS, the application state hangs at my persistence manager where i try to establish a connection. A exception is thrown after exactly 30 minutes.
2011-02-25 15:24:06,137 2292512 ERROR org.hibernate.util.JDBCExceptionReporter Communications link failure
Last packet sent to the server was 0 ms ago. 2011-02-25 16:24:07,944 5894319 ERROR org.hibernate.util.JDBCExcepti开发者_运维技巧onReporter Communications link failure
Last packet sent to the server was 0 ms ago. 2011-02-25 16:24:07,945 5894320 ERROR org.hibernate.util.JDBCExceptionReporter Communications link failure
Last packet sent to the server was 0 ms ago. 2011-02-25 16:24:07,947 5894322 ERROR com.agilent.cgh.dal.persistence.AbstractPersistenceType org.hibernate.exception.JDBCConnectionException: Cannot open connection : Cannot open connection org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:97) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
After a bit of debugging i found that the application hangs in my Spring Framework while loading beanRefContext.xml
Any ideas why the application is unable to start on Mac OS?
I suppose you can take a look to mySql configuration file
/etc/my.cnf
probabilly if I've understood well your request the problem is here:
wait_timeout = 1800
connect_timeout = 10
Also take a look at "max_connections" line. In case you're using connection pooling it can grow faster than expected and get to the limit amount of connections, giving this lines you mentioned as a result.
精彩评论