Disabling requesttimeout when using cfthread

I’m looking to write a background process that runs within the application
context. I figured the best way to do this would be to use cfthread to
create a new run, and loop within that, checking for a control variable on
each iteration (in case it needs to be stopped). However, the thread keeps
dying due to the request time out setting. I can increase or decrease this
using cfsetting within the cfthread tag, but I cannot disable it (setting
it to 0 just makes the timeout happen almost instantly). Increasing the
timeout to something very large won’t work, as I’d like this thread to
ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I understand
this is a potentially dangerous route to go down, as it could lead to
numerous infinitely running threads that could only be killed by restarting
Lucee if I’m not careful. I have looked into both the EventGateway and
Task Scheduler, but neither quite works for what I want to do, although I
haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable) is
not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

Hi Eddie,

Are you running Java 1.8?

If so, sounds like the same issue that been going on in this thread the
past few days.

https://groups.google.com/d/msgid/lucee/ac88c3b0-1638-4560-a908-83da9e342bbe%40googlegroups.com

[LDEV-436] - Lucee fixed this and it was
tagged for version 4.5.2.

The current production release is 4.5.1.xxx and doesn’t have this fix in it.

The current preview release (v. 4.5.2.017) should have the fix.

I asked yesterday if anyone’s running that version in production.On Wed, Nov 4, 2015 at 1:42 PM Andrew Dixon <@Andrew_Dixon> wrote:

Hi Eddie,

From 4.5.1.007 the value of “zero” should give you an infinite timeout:

[LDEV-220] - Lucee

Maybe you just need to update?

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org

On 4 November 2015 at 19:37, eddie barber <@eddie_b> wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable) is
not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/92adbd8a-346e-46ba-a02d-838c8dab2960%40googlegroups.com
https://groups.google.com/d/msgid/lucee/92adbd8a-346e-46ba-a02d-838c8dab2960%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijWP-9juotrmZAkfVUG-hJTCCZ-8Y7ZTOd9YtpcWiMrY0w%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijWP-9juotrmZAkfVUG-hJTCCZ-8Y7ZTOd9YtpcWiMrY0w%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Have you tried creating a task thread instead? Then timeouts and
application tracking are unneeded.
Status and errors show up in the tasks section of the admin - until the
thread completes successfully.
The only time you’d need to set app vars is for users to be able to track
progress.
One minor thing with task threads: put all the input vars needed by the
thread into the attribute collection used to call it. Task threads are not
tied to current page/request/session etc.
I’ve noticed that task threads also do a better job of maintaining good
server performance under load.On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the application
context. I figured the best way to do this would be to use cfthread to
create a new run, and loop within that, checking for a control variable on
each iteration (in case it needs to be stopped). However, the thread keeps
dying due to the request time out setting. I can increase or decrease this
using cfsetting within the cfthread tag, but I cannot disable it (setting
it to 0 just makes the timeout happen almost instantly). Increasing the
timeout to something very large won’t work, as I’d like this thread to
ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable) is
not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the application
context. I figured the best way to do this would be to use cfthread to
create a new run, and loop within that, checking for a control variable on
each iteration (in case it needs to be stopped). However, the thread keeps
dying due to the request time out setting. I can increase or decrease this
using cfsetting within the cfthread tag, but I cannot disable it (setting
it to 0 just makes the timeout happen almost instantly). Increasing the
timeout to something very large won’t work, as I’d like this thread to
ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable) is
not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

Thank you both for the quick replies.

Andrew, I don’t think that particular bug is the issue here, as I was using
the current production release (express version) - 4.5.1.024.

Aaron, the issue you’re describing sounds like it’s what’s happening, as I
am using Java 1.8_60. However, I just pulled down 4.5.2.017-express, and I
appear to be getting the same issue. The only difference is there is a new
Error in the requesttimeout log

“ERROR”,“Thread-54”,“11/04/2015”,“15:45:44”,“”,";lucee.runtime.thread.ChildThreadImpl.stop0(java.lang.Object);java.lang.NoSuchMethodException:
lucee.runtime.thread.ChildThreadImpl.stop0(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at lucee.commons.io.StopThread.run(SystemUtil.java:1085)
"

So not sure if the fix didn’t make it into this version, or if there’s
something else going on.

-EddieOn Wednesday, November 4, 2015 at 3:04:17 PM UTC-5, Aaron Terry wrote:

Are you running Java 1.8?

If so, sounds like the same issue that been going on in this thread the
past few days.

https://groups.google.com/d/msgid/lucee/ac88c3b0-1638-4560-a908-83da9e342bbe%40googlegroups.com

[LDEV-436] - Lucee fixed this and it was
tagged for version 4.5.2.

The current production release is 4.5.1.xxx and doesn’t have this fix in
it.

The current preview release (v. 4.5.2.017) should have the fix.

I asked yesterday if anyone’s running that version in production.

On Wed, Nov 4, 2015 at 1:42 PM Andrew Dixon <andrew...@gmail.com <javascript:>> wrote:

Hi Eddie,

From 4.5.1.007 the value of “zero” should give you an infinite timeout:

[LDEV-220] - Lucee

Maybe you just need to update?

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org

On 4 November 2015 at 19:37, eddie barber <ed...@simtechsolutions.com <javascript:>> wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable)
is not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

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/92adbd8a-346e-46ba-a02d-838c8dab2960%40googlegroups.com
https://groups.google.com/d/msgid/lucee/92adbd8a-346e-46ba-a02d-838c8dab2960%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

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/CAG1WijWP-9juotrmZAkfVUG-hJTCCZ-8Y7ZTOd9YtpcWiMrY0w%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijWP-9juotrmZAkfVUG-hJTCCZ-8Y7ZTOd9YtpcWiMrY0w%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Hi Ed,

I have tried creating a task thread, and I still run into the timeout. Only
real difference in errors I get in the logs is in the requesttimeout.log, I
get

“ERROR”,“Thread-31”,“11/04/2015”,“17:42:28”,“”,";lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.stop0(java.lang.Object);java.lang.NoSuchMethodException:
lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.stop0(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at lucee.commons.io.StopThread.run(SystemUtil.java:1085)
"

So basically the same error of the stop0 method not existing.

EddieOn Wednesday, November 4, 2015 at 5:27:15 PM UTC-5, Ed Sanford, ODI Consulting. wrote:

Have you tried creating a task thread instead? Then timeouts and
application tracking are unneeded.
Status and errors show up in the tasks section of the admin - until the
thread completes successfully.
The only time you’d need to set app vars is for users to be able to track
progress.
One minor thing with task threads: put all the input vars needed by the
thread into the attribute collection used to call it. Task threads are not
tied to current page/request/session etc.
I’ve noticed that task threads also do a better job of maintaining good
server performance under load.

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable) is
not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable) is
not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

Apologies for resurrecting a old-ish thread, but I’m in pretty much the
exact position as Eddie. Need an infinitely running poller thread. Thread
dies after timeout settings. Setting requesttimeout=0 just causes the
thread to die immediately.

I’ve tried this on Lucee version 4.5.2.018 (Java8) and Lucee version
4.5.2.017 (Java7).On Wednesday, November 4, 2015 at 5:48:23 PM UTC-5, eddie b wrote:

Hi Ed,

I have tried creating a task thread, and I still run into the timeout.
Only real difference in errors I get in the logs is in the
requesttimeout.log, I get

“ERROR”,“Thread-31”,“11/04/2015”,“17:42:28”,“”,";lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.stop0(java.lang.Object);java.lang.NoSuchMethodException:
lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.stop0(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at lucee.commons.io.StopThread.run(SystemUtil.java:1085)
"

So basically the same error of the stop0 method not existing.

Eddie

On Wednesday, November 4, 2015 at 5:27:15 PM UTC-5, Ed Sanford, ODI Consulting. wrote:

Have you tried creating a task thread instead? Then timeouts and
application tracking are unneeded.
Status and errors show up in the tasks section of the admin - until the
thread completes successfully.
The only time you’d need to set app vars is for users to be able to track
progress.
One minor thing with task threads: put all the input vars needed by the
thread into the attribute collection used to call it. Task threads are not
tied to current page/request/session etc.
I’ve noticed that task threads also do a better job of maintaining good
server performance under load.

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable)
is not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable)
is not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

I “solved” this by simply using a ridiculous requesttimeout (2147483647
seconds). Comes out to about 68 years, which might as well be infinite.
If this application is still in production and hasn’t restarted after
68 years, then a thread timeout will be the least of my worries.On Sunday, January 3, 2016 at 1:07:12 PM UTC-5, Ricky wrote:

Apologies for resurrecting a old-ish thread, but I’m in pretty much the
exact position as Eddie. Need an infinitely running poller thread. Thread
dies after timeout settings. Setting requesttimeout=0 just causes the
thread to die immediately.

I’ve tried this on Lucee version 4.5.2.018 (Java8) and Lucee version
4.5.2.017 (Java7).

On Wednesday, November 4, 2015 at 5:48:23 PM UTC-5, eddie b wrote:

Hi Ed,

I have tried creating a task thread, and I still run into the timeout.
Only real difference in errors I get in the logs is in the
requesttimeout.log, I get

“ERROR”,“Thread-31”,“11/04/2015”,“17:42:28”,“”,";lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.stop0(java.lang.Object);java.lang.NoSuchMethodException:
lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.stop0(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1786)
at lucee.commons.io.StopThread.run(SystemUtil.java:1085)
"

So basically the same error of the stop0 method not existing.

Eddie

On Wednesday, November 4, 2015 at 5:27:15 PM UTC-5, Ed Sanford, ODI Consulting. wrote:

Have you tried creating a task thread instead? Then timeouts and
application tracking are unneeded.
Status and errors show up in the tasks section of the admin - until the
thread completes successfully.
The only time you’d need to set app vars is for users to be able to
track progress.
One minor thing with task threads: put all the input vars needed by the
thread into the attribute collection used to call it. Task threads are not
tied to current page/request/session etc.
I’ve noticed that task threads also do a better job of maintaining good
server performance under load.

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at
lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable)
is not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at
lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"

On Wednesday, November 4, 2015 at 2:37:02 PM UTC-5, eddie b wrote:

I’m looking to write a background process that runs within the
application context. I figured the best way to do this would be to use
cfthread to create a new run, and loop within that, checking for a control
variable on each iteration (in case it needs to be stopped). However, the
thread keeps dying due to the request time out setting. I can increase or
decrease this using cfsetting within the cfthread tag, but I cannot disable
it (setting it to 0 just makes the timeout happen almost instantly).
Increasing the timeout to something very large won’t work, as I’d like this
thread to ideally run indefinitely.

Is there any way to prevent the timeout from occurring at all? I
understand this is a potentially dangerous route to go down, as it could
lead to numerous infinitely running threads that could only be killed by
restarting Lucee if I’m not careful. I have looked into both the
EventGateway and Task Scheduler, but neither quite works for what I want to
do, although I haven’t completely ruled either out yet.

Below is what I’m seeing in thread.log

“ERROR”,“cfthread-8”,“11/04/2015”,“14:24:49”,“”,"cfthread-8;java.lang.ThreadDeath;java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at lucee.commons.io.StopThread.run(SystemUtil.java:1068)
"

And below is requesttimeout.log

“ERROR”,“Thread-6”,“11/04/2015”,“14:24:49”,“controler”,“stop thread (6)
because run into a timeout path:
D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm.;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at
lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"
“ERROR”,“Thread-23”,“11/04/2015”,“14:24:49”,”","Thread.stop(Throwable)
is not supported by this JVM and failed with
UnsupportedOperationException;java.lang.Throwable;java.lang.Throwable
at java.lang.Thread.sleep(Native Method)
at lucee.runtime.functions.system.Sleep.call(Sleep.java:28)
at
index_cfm$cf.threadCall(D:\lucee\lucee-4.5.1.024-express\webapps\ROOT\index.cfm:17)
at
lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:199)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:148)
"