add possibility to add a cpu/memory/concurrent request threshold for request timeout
Description
relates to
Activity
Zac Spitzer 1 March 2021 at 17:58(edited)
from my reading of the code, it’s still only from environment variables
after a request is running for 10s, it’s thread gets put to a lower priority
https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L317
on reaching timeout, if the three thresholds (concurrent/cpu & mem) are met (or not set, they default to 0 which is considered true), requests will be terminated
https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L303
but if the system is running below the thresholds it will allow requests to continue, rather than terminating them
https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L308
So, my rough understanding from reading the code is that if you set thresholds, you can potentially allow a dynamic timeout beyond the default timeout, if you have spare cpu/ram/ not too many users?
this all defaults to being enabled, you can disable this behaviour with the environment var lucee.requesttimeout
which defaults to true
https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L271
Samuel W. Knowlton 1 March 2021 at 15:40
@Zac Spitzer If you can tell me what this change is exactly, I can document it. Is it that this previously required an environment setting but can now be set on a per-request basis (or just per-application basis?) If so, what exactly is the syntax to do this outside of an environment variable?
Does the threshold value reflect the percentage, i.e. a cpu threshold of .75 means a threshold of 75% CPU usage, at which point…what will happen? Additional requests will be queued? Or just that a single request can’t exceed this amount?
Michael Offner 26 August 2020 at 09:36
also the request timeout can be disabled via “lucee.requesttimeout“
Michael Offner 26 August 2020 at 08:35
ATM this can only be configured via en var
lucee.requesttimeout.memorythreshold // floating point number between 0 and 1
lucee.requesttimeout.cputhreshold // floating point number between 0 and 1
lucee.requesttimeout.concurrentuserthreshold // integer
Details
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
add possibility to add a cpu/memory/concurrent request threshold for request timeout