Hi,
Occasionally and randomly our application would take a while to respond (the browser would wait for a response) and after several seconds the page returned was blank with no content. It is quite rare that this happens. But this morning there was no timeout and the entire application was returning blank pages with no content. We had to restart Lucee to get it back to normal. It had been a while since we last restarted Lucee.
I found this topic: https://lucee.daemonite.io/t/lucee-stops-serving-pages-after-error/4474
When I look in the Lucee Log Viewer plugin, I see a bunch of errors like this one :
application.logERROR 08:32:30, 1 déc, 2021Thread-44
"was not able to stop controller thread running for 12943672ms;java.lang.Throwable;java.lang.Throwable
/application.cfc:339
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2054)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6596)
at com.microsoft.sqlserver.jdbc.TDSReader.nextPacket(IOBuffer.java:6546)
at com.microsoft.sqlserver.jdbc.TDSReader.ensurePayload(IOBuffer.java:6524)
at com.microsoft.sqlserver.jdbc.TDSReader.peekTokenType(IOBuffer.java:6731)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:61)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1628)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processResults(SQLServerStatement.java:1302)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processBatch(SQLServerStatement.java:1293)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.processExecuteResults(SQLServerStatement.java:1286)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.processResponse(SQLServerPreparedStatement.java:530)
at com.microsoft.sqlserver.jdbc.TDSCommand.close(IOBuffer.java:7445)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.discardLastExecutionResults(SQLServerStatement.java:142)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.closeInternal(SQLServerStatement.java:653)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.closeInternal(SQLServerPreparedStatement.java:328)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.$fr$close(SQLServerStatement.java:668)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.close(SQLServerStatement.java)
at lucee.commons.db.DBUtil.closeEL(DBUtil.java:71)
at lucee.runtime.type.QueryImpl.execute(QueryImpl.java:331)
at lucee.runtime.type.QueryImpl.<init>(QueryImpl.java:235)
at lucee.runtime.tag.Query.executeDatasoure(Query.java:1134)
at lucee.runtime.tag.Query._doEndTag(Query.java:699)
at lucee.runtime.tag.Query.doEndTag(Query.java:565)
at cfc.myproject.client.transactions_paiements_cfc585$cf.udfCall(/cfc/myproject/client/transactions_paiements.cfc:269)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1925)
at lucee.runtime.tag.Invoke.doComponent(Invoke.java:209)
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:186)
at application_cfc$cf.udfCall(/application.cfc:339)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:437)
at lucee.runtime.listener.ModernAppListener.onSessionEnd(ModernAppListener.java:362)
at lucee.runtime.type.scope.ScopeContext.clearUnusedMemoryScope(ScopeContext.java:961)
at lucee.runtime.type.scope.ScopeContext.clearUnused(ScopeContext.java:825)
at lucee.runtime.engine.Controler.control(Controler.java:346)
at lucee.runtime.engine.Controler.control(Controler.java:244)
at lucee.runtime.engine.Controler.access$000(Controler.java:58)
at lucee.runtime.engine.Controler$ControlerThread.run(Controler.java:113)
And there is one with 607268603ms! Same CFC file. Same line in the application.cfc.
The error is related to the OnSessionEnd method in the application.cfc that loops through a set of databases to delete records in a table that relate to the session that just ended. This is code that has been around for years without a problem. I still find it weird that these threads have been running for a long time …
I looked in FusionReactor, but I can’t find anything conclusive yet.
Any ideas?
OS: Windows Server 2016 (10.0) 64bit
Java Version: 1.8.0_181 (Oracle Corporation) 64bit
Tomcat Version: Apache Tomcat/8.5.33
Lucee Version: Lucee 5.3.8.206