Details
Assignee
Michael OffnerMichael OffnerReporter
Jan JannekJan JannekPriority
MajorNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Jan Jannek
Jan JannekPriority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
Created 23 October 2015 at 18:21
Updated 12 November 2024 at 10:29
Hi there Lucee team,
I encountered errors and request timeouts while using the java concurrency framework (not pure threads)
Basically the following is done:
ThreadPoolExecutor is created
a task is submitted and the request completes normally
the task runs fine (async in a created thread, just sleeping for 10s) and completes normally
after the task is completed some time goes by (to be more specific the amount of time specified in the request timeout in the lucee admin)
Errors show up in the requesttimeout.log as well as in the Console
Find a Mini-Test-Application attached. Just extract it somewhere in a folder beneath the webroot and call the index.cfm. Then watch the Console and requesttimeout.log.
I don't understand why the request timeout kicks in as the task is already completed. Even if the task itself running in a thread would take longer than the request timeout, the timeout should not be applied IMHO. And in the example neither the request that creates the thread pool nor the task that the thread runs takes longer than the request timeout.
It is obvious that the ThreadPoolExecutor might hold threads in a thread pool (for reuse). That' its job.
Did I do something wrong? Why does Lucee care about the threads in the pool and tries to stop them at all?
You can also try out Marc Esher's cfconcurrent framework and get the same results. Just try one or more of the sample apps that ship with the framework code. I don't think that this is intended behaviour.
https://github.com/marcesher/cfconcurrent
Right now my workaround is to set the request timeout to a very high number in the request that creates the thread pool (and hope that the application is restarted before the timeout occurs). it might also help to set the request time out within the thread that is created. But this is only a workaround and I do not think that this should be necessary. As mentioned neither the request that creates the thread pool nor one of the single threads takes long processing time.
For reference, these are two forum topics as well as a cfconcurrent issue I created (actually I first saw the problem while using Marc's framework)
https://groups.google.com/forum/m/#!topic/lucee/sFKrlGPJ1Xc
https://groups.google.com/forum/m/#!topic/lucee/KPGiH9zF5C8
https://github.com/marcesher/cfconcurrent/issues/3
Help or a fix is much appreciated. And please keep up the excellent work!
Best regards,
Jan