Supervisor v1.0.5 Release Notes

Release Date: 2004-07-29 // almost 20 years ago
    • 🚀 Short description: In previous releases, managed programs that created voluminous stdout/stderr output could run more slowly than usual when invoked under supervisor, now they do not.

    Long description: The supervisord manages child output by polling pipes related to child process stderr/stdout. Polling operations are performed in the mainloop, which also performs a 'select' on the filedescriptor(s) related to client/server operations. In prior releases, the select timeout was set to 2 seconds. This release changes the timeout to 1/10th of a second in order to keep up with client stdout/stderr output.

    Gory description: On Linux, at least, there is a pipe buffer size fixed by the kernel of somewhere between 512 - 4096 bytes; when a child process writes enough data to fill the pipe buffer, it will block on further stdout/stderr output until supervisord comes along and clears out the buffer by reading bytes from the pipe within the mainloop. We now clear these buffers much more quickly than we did before due to the increased frequency of buffer reads in the mainloop; the timeout value of 1/10th of a second seems to be fast enough to clear out the buffers of child process pipes when managing programs on even a very fast system while still enabling the supervisord process to be in a sleeping state for most of the time.