-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
State transition can take far too long if system clock is set to an earlier time #1043
Comments
What version of Supervisor are you using ( |
Version 3.3.2 |
To add more context, this is definitely a separate issue from #802. This is not related to the HTTP response issue that was apparently address this is a separate issue which can present similar symptoms. |
I pushed some changes to my PR (#1047) a few weeks ago in an attempt to address your comments. Please review the latest changes when you have a moment. |
If the system clock is set to an earlier time after a process is started but before it has entered the
RUNNING
state,supervisorctl start <process_name>
can hang for a very long time waiting for the current system time to become greater thanself.laststart + self.config.startsecs
, depending on how far backward the system time has moved.I have resolved the issue with the following modification to the
transition()
function in process.py:This solution still ensures that the process has remained running for at least
self.config.startsecs
while only increasing the maximum wait time to2 * self.config.startsecs
if the system clock is detected to have moved backward.As I'm not too familiar with this code, I'm not sure if this is the best solution, nor am I sure if any other functions may require a check of this nature as well, so I figured I would leave this suggestion here and let a Supervisor dev who is more familiar with the code base decide on the most appropriate solution.
Please let me know if I can be of further assistance.
The text was updated successfully, but these errors were encountered: