Closed philipstarkey closed 3 years ago
This version of the supervisor reads one line at a time. supervisor/helpers
This is a known issue but I haven't been able to solve it yet.
Perhaps it will solve the problem.
I made some changes that slightly improve data reading. Update and test.
Thanks! This seems to have fixed the issue, at least for my specific usage. Much appreciated!
Using windows apis I have completely changed the way the process data is read / written. It gets better than the previous implementation because all the data will be read / written as precision. If you want to do a test, just update git again. With that this problem is solved.
Checked the latest version too and it also works. Thanks again!
I'm attempting to have supervisord manage an ffmpeg process and I've realised that the last output before exist/crash is not stored in the log file. I'm uncertain if this is a supervisor-win issue or an upstream issue as I don't have a linux machine to test on at the moment.
Example config
The correct output from this (to store in the log) is
But what I see in the log is just
which is only the first line of the message.
If I change
delaysecs
to 0.0002, then I see a bit more output, but still not the whole message.It seems like supervisor is not reading the whole of the stdout pipe once it closes.
modifying
supervisor.process.Subprocess.close_all_dispatchers
to callself.dispatchers[fd].handle_read_event()
repeatedly does result in the whole message being logged (although this is probably not the right solution as what I tried ultimately ended up in an infinite loop).Does this seem like a windows/supervisor-win problem or is it an issue with the fact that supervisor appears to only read one line from stdout/err per loop of it's main function? (which seems to imply anything logging faster than one line per delaysecs will ultimately result in dropped log messages?)