Using JDK 7 the following errors occur:
Console:
Exception in thread “pool-3-thread-1” java.lang.IllegalMonitorStateException
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.signal(AbstractQueuedSynchronizer.java:1941)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1100)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Exception in thread “pool-1-thread-7” java.lang.IllegalMonitorStateException
at
java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:155)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1260)
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:460)
at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:449)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
and so on (multiple times, recurring every few seconds)
requesttimeout.log
“ERROR”,“Thread-18”,“04/15/2015”,“11:54:34”,“controler”,"stop thread (37)
because run into a timeout (fail to retrieve
path:java.lang.NullPointerException:null).;java.lang.Throwable;java.lang.Throwable
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2090)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
at
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
"
I hope this helps.
JanOn Wednesday, April 15, 2015 at 10:59:49 AM UTC+2, Micha wrote:
it is hard to say why it is happening, the only thing i can read from your
exception is that Lucee was trying to stop a thread and was failing, after
that fix we should have more details in the log to see what is exactly
happening.
Micha
On Wed, Apr 15, 2015 at 10:22 AM, Jan Jannek <jja...@gmail.com <javascript:>> wrote:
Hi Micha,
thank you very much for the quick response.
However one question remains:
Why does a request timeout happen at all in this case?
I am using a ScheduledThreadPoolExecutor (
http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html)
which runs recurring tasks in separate Java Threads (forever, as long as
the application is alive). Each task run only takes a couple of seconds.
Is the whole scheduled execution subject to the request timeout? Would it
be required to set the request timeout to 0 in the Lucee admin to make it
work (that would be odd as it affects all requests).
I create and start the scheduled thread pool executor in
onApplicationStart in the Application.cfc and store it in the application
scope. Would it be possible to set the request timeout using cfsetting
within onApplicationStart (which is kind of strange).
To reproduce the problem just try out the ScheduledExecutor example that
ships with the cfconcurrent framework (
GitHub - marcesher/cfconcurrent: A boilerplate-reduction library for using the Java Concurrency Framework in ColdFusion applications). There the
errors/requesttimeouts also occur.
Any further ideas or suggestions are appreciated.
Jan
–
You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/3dfa8d52-9417-4dad-b1a5-8ab9389482e4%40googlegroups.com
https://groups.google.com/d/msgid/lucee/3dfa8d52-9417-4dad-b1a5-8ab9389482e4%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.