<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div style="font-family: Verdana, Arial, Helvetica, sans-serif;">Hi Bernhard,</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;">you can increase wait_timeout DB settings:</div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size: 12.8px;">https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout</span></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif"><br></font></div><div style=""><font face="Verdana, Arial, Helvetica, sans-serif">The problem is long inactivity (more than 8 hours) of your database. Connection is closed and when you make the first request it will cause an error. Connection is restored and other requests are OK than. S</font><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">etting</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;"> </span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">wait_timeout will increases 8 hours interval.</span></div><div style=""><br><font face="Verdana, Arial, Helvetica, sans-serif">S pozdravem / Kind regards</font><br><br><font face="Verdana, Arial, Helvetica, sans-serif">Filip Kratochvil</font><br><font face="Verdana, Arial, Helvetica, sans-serif">OpenCms Consultant</font><br></div><br><br><font color="#990099" style="font-family: Verdana, Arial, Helvetica, sans-serif;">-----opencms-dev-bounces@opencms.org wrote: -----</font><div class="iNotesHistory" style="font-family: Verdana, Arial, Helvetica, sans-serif; padding-left: 5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: The OpenCms mailing list <opencms-dev@opencms.org><br>From: "Schliemann, Kai" <k.schliemann@comundus.com><br>Sent by: opencms-dev-bounces@opencms.org<br>Date: 05/16/2018 10:05AM<br>Subject: Re: [opencms-dev] SQL-Timeout<br><br>
<!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8">-->
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Bernhard,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-fareast-language:EN-US">you may try to set a test query in opencms.properties like this:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New"">db.pool.default.testQuery=SELECT 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">HTH<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Kai <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> opencms-dev-bounces@opencms.org <opencms-dev-bounces@opencms.org>
<b>Im Auftrag von </b>Bernhard Zebedin<br>
<b>Gesendet:</b> Dienstag, 15. Mai 2018 11:27<br>
<b>An:</b> The OpenCms mailing list <opencms-dev@opencms.org><br>
<b>Betreff:</b> [opencms-dev] SQL-Timeout<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:12.0pt;color:black">Dear all...<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black">I have an interesting problem.<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black">On one of my OpenCMS instances I get following errors:<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15 May 2018 10:53:22,225 WARN [cexport.CmsStaticExportManager:2434] Datei "/shared/Bilder/Logos/AMP_logo2.png_790064987.png" kann nicht exportiert werden. Hat der Benutzer "guest" Leseberechtigung?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">org.opencms.db.CmsDbSqlException: Fehler beim Lesen der Parameter f?r eine Ressource in der Tabelle aller ver?ffentlichter Template-Ressourcen mit dem tats?chlichen Dateinamen "/shared/Bilder/Logos/AMP_logo2.png_790064987.png".<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.CmsDbSqlException.createException(CmsDbSqlException.java:109)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:335)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.CmsDbContext.report(CmsDbContext.java:287)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.CmsSecurityManager.readStaticExportPublishedResourceParameters(CmsSecurityManager.java:5279)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.file.CmsObject.readStaticExportPublishedResourceParameters(CmsObject.java:3491)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.staticexport.CmsStaticExportManager.getRfsExportData(CmsStaticExportManager.java:2410)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.staticexport.CmsStaticExportManager.getExportData(CmsStaticExportManager.java:910)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.main.OpenCmsServlet.handle(OpenCmsServlet.java:209)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.main.OpenCmsServlet.invokeHandler(OpenCmsServlet.java:292)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.jsp.jsonpart.CmsJsonPartFilter.doFilter(CmsJsonPartFilter.java:281)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.main.OpenCmsUrlServletFilter.doFilter(OpenCmsUrlServletFilter.java:132)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1580)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1537)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.lang.Thread.run(Thread.java:748)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Caused by: org.opencms.db.CmsDbSqlException: Ein SQL-Fehler ist aufgetreten beim Ausf?hren der folgenden Datenbankabfrage:
<a href="mailto:com.mysql.jdbc.JDBC4PreparedStatement@37826c1">com.mysql.jdbc.JDBC4PreparedStatement@37826c1</a>: EXCEPTION: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.generic.CmsProjectDriver.readStaticExportPublishedResourceParameters(CmsProjectDriver.java:2604)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.CmsDriverManager.readStaticExportPublishedResourceParameters(CmsDriverManager.java:7950)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.CmsSecurityManager.readStaticExportPublishedResourceParameters(CmsSecurityManager.java:5277)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">... 35 more<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 83,754,956 milliseconds ago. The last packet sent successfully to
the server was 83,754,956 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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.lang.reflect.Constructor.newInstance(Constructor.java:526)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3941)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2551)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2818)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2157)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2324)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at org.opencms.db.generic.CmsProjectDriver.readStaticExportPublishedResourceParameters(CmsProjectDriver.java:2594)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">... 37 more<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Caused by: java.net.SocketException: Broken pipe (Write failed)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.net.SocketOutputStream.socketWrite0(Native Method)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.net.SocketOutputStream.write(SocketOutputStream.java:161)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3922)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">... 46 more<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><br>
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Where can I configure such a "wait_timeout" ??<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">After log in an re-export static content everything is fine....<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">kr<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Bernhard<o:p></o:p></span></p>
</div>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div><font face="Courier New,Courier,monospace" size="3">_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit<br><a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br><br><br><br></font></div></k.schliemann@comundus.com></div></div><div><br><hr>Disclaimer:<br><br>The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it.<br>It may contain confidential or legally privileged information.<br>If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful.<br>If you have received this communication in error, please notify us immediately by forwarding this email to ict@ibacz.eu and then delete it from your system.<br>IBA Group is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.<br> </div></font>