RequestTimeout=0 should DISABLE request timeouts, not set them very high

Description

In LDEV-220, requesttimeout=0 was made to not error, however, for both ACF compatibility and for totally valid developer reasons, this should disable the timeout of the request altogether.

Valid use case: using Java concurrent to start a thread pool / manager / scheduler that run indefinitely and are written in CFML (using CreateDynamicProxy). Right now, if you do this (using CFConcurrent, for example), your logs fill up with errors where Lucee is trying to kill these threads.

Activity

Show:

Dominic Watson 10 July 2018 at 10:00

Sure thing, yes. I might raise another ticket for the global setting if ok (and create a pull request), unless this is likely to be rejected?

Michael Offner 10 July 2018 at 09:47

can i close the ticket?

Michael Offner 10 July 2018 at 09:47

It is simpler not to make 2 cases you have to handle differently. In Lucee every request has a request timeout.
sure you could do

if(rt!=0 && start+rt<now) stop();

but in the end this is simpler

if(start+rt<now) stop();

and you don't have the risk that if you check that value in a new place that you not forget to check the special condition "0", because there is no special condition.

you always can argue in both directions, i personally prefer to have a setting always available with a default value, so you not have to check if the setting exists in the first place.

Dominic Watson 10 July 2018 at 08:04

Fair enough - it seems an odd solution and I did see that in code. i.e. why not just skip all checks where the timeout is `<= 0`? Is there a good reason not to do that?

FWIW, I was able to completely disable engine-wide timeouts with this awful cludge:

CreateObject( "java", "lucee.loader.engine.CFMLEngineFactory" ).getInstance().getFDController();

I'm not using that as an option, but it works. Would be good to have some official ways to set engine.allowRequestTimeout(false);. i.e. a server admin setting for ignoring request timeouts that ACF has (and also OpenBD do not do timeouts at all). Probably not used in most cases, but valid in some.

Michael Offner 10 July 2018 at 07:47

in case of 0 or less Lucee sets a timeout of Long.MAX_VALUE, what normally is "9223372036854775807".
this are 2562047788015 days or around 106751991167 years!
in theory not the same as no timeout, but in practice it makes no difference.

Won't Do

Details

Assignee

Reporter

Labels

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

Priority

Created 10 July 2018 at 07:00
Updated 20 May 2021 at 09:19
Resolved 10 July 2018 at 13:11

Flag notifications