Error MySQL connection after upgrade to lucee 5.3.6.61

Description

After I upgrade my lucee from 5.3.4.80 to 5.3.6.61 sometime I always get this error:
lucee.runtime.listener.ModernAppListenerException: The last packet successfully received from the server was 143,534,565 milliseconds ago. The last packet sent successfully to the server was 143,534,565 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.

below is the stacktrace i've got from FR:

com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:970)
com.mysql.cj.jdbc.ClientPreparedStatement.$fr$execute(ClientPreparedStatement.java:387)
com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java)
lucee.runtime.type.util.QueryUtil.execute(QueryUtil.java:327)
lucee.runtime.type.QueryImpl.execute(QueryImpl.java:280)
lucee.runtime.type.QueryImpl.<init>(QueryImpl.java:225)
lucee.runtime.tag.Query.executeDatasoure(Query.java:1091)
lucee.runtime.tag.Query._doEndTag(Query.java:672)
lucee.runtime.tag.Query.doEndTag(Query.java:552)
org.lucee.cfml.query_cfc$cf.udfCall(/org/lucee/cfml/Query.cfc:227)
lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:779)
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
org.lucee.cfml.query_cfc$cf.udfCall(/org/lucee/cfml/Query.cfc:37)
lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
lucee.runtime.ComponentImpl._call(ComponentImpl.java:680)
lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
lucee.runtime.ComponentImpl.call(ComponentImpl.java:1898)
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
application_cfc$cf.udfCall1(/go/Application.cfc:244)
application_cfc$cf.udfCall(/go/Application.cfc)
lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:779)
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
application_cfc$cf.udfCall1(/go/Application.cfc:161)
application_cfc$cf.udfCall(/go/Application.cfc)
lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:779)
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
application_cfc$cf.udfCall1(/go/Application.cfc:139)
application_cfc$cf.udfCall(/go/Application.cfc)
lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
lucee.runtime.ComponentImpl._call(ComponentImpl.java:680)
lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
lucee.runtime.ComponentImpl.call(ComponentImpl.java:1898)
lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:436)
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:132)
lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:104)
lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2416)
lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2406)
lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2381)
lucee.runtime.engine.Request.exe(Request.java:43)
lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1127)
lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1073)
lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47)
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:251)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:186)
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:227)
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:149)
io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)
org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:45)
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:251)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:186)
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:227)
io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:149)
io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:772)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:344)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:207)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:809)
com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:42)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java)
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Environment

lucee 5.3.6.61
docker-commandbox 5.0.0
mysql driver 8.0.15

Activity

Show:
Charles Tang
June 5, 2020, 3:29 PM

, unfortunately we can’t upgrade to MySQL server 8.0.19 due to some incompatibilities with our code (eg. null values for dates). The MySQL DB version we’re using is Percona MySQL 5.7.29. However, the MySQL datasource extension we’re using is version 8.0.19.

We’re still experiencing this issue with MySQL datasource extension 8.0.19, unfortunately.

Charles

Pothys - MitrahSoft
June 26, 2020, 10:58 AM

OK. I checked this and couldn't able to reproduce the exact issue. Because, it works fine for me.
will confirm about this issue.

Andri Senjaya
October 28, 2020, 10:55 AM

FYI, I still can get this problem with lucee 5.3.7.43 with mysql ext 8.0.19, below is the stack trace

 

Charles Tang
October 28, 2020, 12:26 PM

Yes, we’re also still experiencing this issue. For some reason, the datasource itself is not timing out even when we set the “Connection timeout” to 60 mins. So, the datasource doesn’t timeout but MySQL kills the connection due to inactivity after 8 hours.

My software versions are as below:

Lucee 5.3.6.61
Percona MySQL Server 5.7.30
MySQL JDBC Driver 8.0.19

Charles

Andri Senjaya
November 3, 2020, 2:48 AM
Edited

maybe since lucee 5.3.6 the param autoReconnect=true is not working anymore ? or has bugs ?

I also notice with lucee 5.3.7.47 when I check the process list in mysql the dbconnection is higher then 5.3.4.80. when I compare, with lucee 5.3.4.80 the dbconenction around 400connections, with lucee 5.3.7 the dbconnection get increase to 700connections with same user used my application.

Assignee

Michael Offner

Reporter

Andri Senjaya

Priority

Major

Fix versions

None

Affects versions

Configure