[opencms-dev] mysql jdbc4 socket write error

Filip Kratochvil filip.kratochvil at nelasoft.cz
Fri Feb 12 10:59:24 CET 2016


Hi Chris,

 

i think you can avoid this exception by modify some mysql connection pool
settings in opencms.properties too, byt i dont remember which atributes
makes the trickJ

 

--
S pozdravem / Kind regards
Filip Kratochvil
------------------------------------------------
NELASOFT Technologies, s.r.o.
E-mail:  <mailto:filip.kratochvil at nelasoft.cz> filip.kratochvil at nelasoft.cz
Web:  <http://www.nelasoft.cz/> www.nelasoft.cz

Twitter:  <https://twitter.com/NELASOFT> @NELASOFT

 

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Christoph Kukulies
Sent: Friday, February 12, 2016 10:55 AM
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] mysql jdbc4 socket write error

 

I've been advised in private Email by a friendly co-reader of this list -
all here are friendly, of course - 
to raise values in my.ini / my.cnf of wait_timeout und interactive_timeout.
default is 28800 secs.
(which seems to me a large value). OTOH I read in the net that it is
advisable to lower this value
on webservers in production environments, where it may appear undesirable to
have dangling sockets
blocking for such a long time. 

-- 
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de 



Am 12.02.2016 um 09:45 schrieb Christoph Kukulies:

This just happened to me under 9.5.3 on a large publish

An SQL error occurred when executing the following query:
com.mysql.jdbc.JDBC4PreparedStatement at 13ad085: EXCEPTION:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after statement closed..
Reason: The last packet successfully received from the server was 58,031,040
milliseconds ago. The last packet sent successfully to the server was
58,031,040 milliseconds ago. is longer than the server configured value of
'wait_timeout'. You should consider either expiring and/or testing
connection validity before use in your application, increasing the server
configured values for client timeouts, or using the Connector/J connection
property 'autoReconnect=true' to avoid this problem.
Reason: Software caused connection abort: socket write error
 



Corresponding Details:

org.opencms.db.CmsDbSqlException: An SQL error occurred when executing the
following query: com.mysql.jdbc.JDBC4PreparedStatement at 13ad085: EXCEPTION:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after statement closed.. 
  at
org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:2354)
  at
org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java:7579)
  at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:7348)
  at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4987)
  at org.opencms.file.CmsObject.readResource(CmsObject.java:3084)
  at org.opencms.file.CmsObject.readDefaultFile(CmsObject.java:2379)
  at org.opencms.file.CmsObject.readDefaultFile(CmsObject.java:2347)
  at org.opencms.main.OpenCmsCore.initResource(OpenCmsCore.java:1537)
  at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1730)
  at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:159)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
)
  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103
)
  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:620)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  at java.lang.Thread.run(Unknown Source)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last
packet successfully received from the server was 58,031,040 milliseconds
ago.  The last packet sent successfully to the server was 58,031,040
milliseconds ago. is longer than the server configured value of
'wait_timeout'. You should consider either expiring and/or testing
connection validity before use in your application, increasing the server
configured values for client timeouts, or using the Connector/J connection
property 'autoReconnect=true' to avoid this problem.
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
  at java.lang.reflect.Constructor.newInstance(Unknown Source)
  at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
  at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121)
  at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3941)
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2551)
  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2818)
  at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2157
)
  at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2324)
  at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
reparedStatement.java:96)
  at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
reparedStatement.java:96)
  at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
reparedStatement.java:96)
  at
org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:2335)
  ... 23 more
Caused by: java.net.SocketException: Software caused connection abort:
socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
  at java.io.BufferedOutputStream.flush(Unknown Source)
  at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3922)
  ... 32 more
 
Anyone seen this before?
 


-- 
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de 






Dieser Nachrichteninhalt wird auf Anfrage komplett heruntergeladen.

 

-- 
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160212/3d9dadd3/attachment.htm>


More information about the opencms-dev mailing list