-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workers unexpectedly time out if system time changes #1709
Comments
Looks like |
It should be available since Python 3.3, but we could (IMHO should) use e.g. https://pypi.python.org/pypi/monotonic to also make this fix available on older Python versions. Quickly looking through the code it doesn't seem to be too hard except that in gunicorn/gunicorn/workers/workertmp.py Line 50 in 2b839ca
|
We use gunicorn on an embedded system where the clock ends up jumping ahead due to particular events. When the clock jump occurs, we see this same issue. |
Closed by #1967. |
Worker timeouts currently use the system clock for checking timeouts, delays, etc..
This is not robust as the system time might jump (e.g. due to NTP, PTP or other time updates)
IMHO these timeouts should use the monotonic clock as here we never care about the system time, but just the real elapsed time to check whether we need to kill a worker.
The text was updated successfully, but these errors were encountered: