cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mr.abanjo" <mr.aba...@gmail.com>
Subject Mysql exception caused byclosed connection
Date Thu, 27 May 2010 12:32:44 GMT
Hi,
i have a problem with MYSQL.
When i try to perform a query (a simple select) i receive an exception.
This happens only when i wait (doing nothing) for a 2 minutes. After this
next queries works well.
It seems that the connection was unexplectly closed.
I thinked about a socket timeout on a firewall, but my collegues (net team)
guarantee me that there ins't any firewall in the connection between the
front end server and the database server.
So i really don't know why this happens.
I tryed with "autoReconnectForPools=true" in a mysql connection string, but
the problem still persist.
Anyone has suggests?
Thanks
Davide

P.S. i'm using cayenne 3.0


[27-05-2010 14:05:39.751] *** error.
[27-05-2010 14:05:39.751] com.mysql.jdbc.CommunicationsException:
Communications link failure due to underlying exception:
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751] ** BEGIN NESTED EXCEPTION **
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751] java.net.SocketException
[27-05-2010 14:05:39.751] MESSAGE: Broken pipe
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751] STACKTRACE:
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751] java.net.SocketException: Broken pipe
[27-05-2010 14:05:39.751]       at
java.net.SocketOutputStream.socketWrite0(Native Method)
[27-05-2010 14:05:39.751]       at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
[27-05-2010 14:05:39.751]       at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
[27-05-2010 14:05:39.751]       at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
[27-05-2010 14:05:39.751]       at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
[27-05-2010 14:05:39.751]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.751]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:422)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:69)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction$2.transform(DataDomainQueryAction.java:395)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:850)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:392)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:121)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:743)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:333)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1278)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1267)
...........
.........
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751] ** END NESTED EXCEPTION **
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751]
[27-05-2010 14:05:39.751] Last packet sent to the server was 0 ms ago.
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
[27-05-2010 14:05:39.751]       at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
[27-05-2010 14:05:39.751]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.751]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:422)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:69)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction$2.transform(DataDomainQueryAction.java:395)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:850)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:392)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:121)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:743)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:333)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1278)
[27-05-2010 14:05:39.751]       at
org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1267)
......................
[27-05-2010 14:05:39.757] *** error.
[27-05-2010 14:05:39.757]
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.
[27-05-2010 14:05:39.757]       at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
[27-05-2010 14:05:39.757]       at
com.mysql.jdbc.Connection.getMutex(Connection.java:3755)
[27-05-2010 14:05:39.757]       at
com.mysql.jdbc.Connection.rollback(Connection.java:5251)
[27-05-2010 14:05:39.757]       at
com.caucho.sql.UserConnection.rollback(UserConnection.java:650)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.InternalTransaction.processRollback(InternalTransaction.java:123)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.ExternalTransaction.rollback(ExternalTransaction.java:130)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:869)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:392)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:121)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:743)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:333)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1278)
[27-05-2010 14:05:39.757]       at
org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1267)
.................
[27-05-2010 14:05:39.760] ** BEGIN NESTED EXCEPTION **
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760] java.net.SocketException
[27-05-2010 14:05:39.760] MESSAGE: Broken pipe
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760] STACKTRACE:
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760] java.net.SocketException: Broken pipe
[27-05-2010 14:05:39.760]       at
java.net.SocketOutputStream.socketWrite0(Native Method)
[27-05-2010 14:05:39.760]       at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
[27-05-2010 14:05:39.760]       at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
[27-05-2010 14:05:39.760]       at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
[27-05-2010 14:05:39.760]       at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
[27-05-2010 14:05:39.760]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.760]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:422)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:69)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomainQueryAction$2.transform(DataDomainQueryAction.java:395)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:850)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:392)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:121)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:743)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:333)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1278)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1267)
[27-05-2010 14:05:39.760]       at
it..................rpreferenceloader.utils.SingleUserPreferenceService.loadByUid(SingleUserPreferenceService.java:50)
[27-05-2010 14:05:39.760]       at
it.matrix.mobi.virgilio.userpreferenceloader.utils.SingleIstatReaderService.load(SingleIstatReaderService.java:56)
[27-05-2010 14:05:39.760]       at
it.matrix.mobi.virgilio.micro.local.eventi.bean.EventiLocalBean.init(EventiLocalBean.java:39)
[27-05-2010 14:05:39.760]       at
sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
[27-05-2010 14:05:39.760]       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[27-05-2010 14:05:39.760]       at
java.lang.reflect.Method.invoke(Method.java:597)
[27-05-2010 14:05:39.760]       at
com.caucho.el.MethodExpr.getValue(MethodExpr.java:96)
[27-05-2010 14:05:39.760]       at
com.caucho.el.Expr.evalObject(Expr.java:224)
[27-05-2010 14:05:39.760]       at
_jsp._canali._eventi._listing__jsp._jspService(_listing__jsp.java:215)
[27-05-2010 14:05:39.760]       at
com.caucho.jsp.JavaPage.service(JavaPage.java:61)
[27-05-2010 14:05:39.760]       at
com.caucho.jsp.Page.pageservice(Page.java:587)
[27-05-2010 14:05:39.760]       at
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195)
[27-05-2010 14:05:39.760]       at
com.caucho.tools.profiler.ProfilerFilter.doFilter(ProfilerFilter.java:147)
[27-05-2010 14:05:39.760]       at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
[27-05-2010 14:05:39.760]       at
it.matrix.mobi.virgilio.micro.servlet.SetCookieSupportFilter.filter(SetCookieSupportFilter.java:37)
[27-05-2010 14:05:39.760]       at
it.matrix.mobi.virgilio.micro.generic.GenericFilter.doFilter(GenericFilter.java:45)
[27-05-2010 14:05:39.760]       at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
[27-05-2010 14:05:39.760]       at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)
[27-05-2010 14:05:39.760]       at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)
[27-05-2010 14:05:39.760]       at
com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:435)
[27-05-2010 14:05:39.760]       at
com.caucho.server.port.TcpConnection.run(TcpConnection.java:678)
[27-05-2010 14:05:39.760]       at
com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
[27-05-2010 14:05:39.760]       at
com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
[27-05-2010 14:05:39.760]       at java.lang.Thread.run(Thread.java:619)
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760] ** END NESTED EXCEPTION **
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760]
[27-05-2010 14:05:39.760] Last packet sent to the server was 0 ms ago.
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
[27-05-2010 14:05:39.760]       at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
[27-05-2010 14:05:39.760]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.760]       at
com.caucho.sql.UserPreparedStatement.executeQuery(UserPreparedStatement.java:90)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
[27-05-2010 14:05:39.760]       at
org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
[27-05-2010 14:05:39.760]       ... 35 more

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message