[Supervisor-users] event listener buffers and state events

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Supervisor-users] event listener buffers and state events

Paul Lockaby-2
Hello, I've been been using supervisor for a few months now but now I'm noticing that I'm experiencing two (to me) major problems.

Let's say I have a listener configured like this:

    [eventlistener:mon-prog]
    command = /usr/local/bin/monitor
    events = TICK_60,PROCESS_STATE,PROCESS_LOG
    buffer_size = 1024

In the event monitor's logs, I can clearly see it getting all of the events and acting on each one. But in supervisor's logs I'm still seeing this:

    2014-03-20 12:04:35,289 ERRO pool mon-prog event buffer overflowed, discarding event 549339

This is completely filling up my logs and extremely misleading. Were my event listener not receiving the events a countdown timer in the monitor program would have notified me.

The second problem seems to be with exit codes. I have a program configured like this:

    [program:myprog]
    command = /usr/local/bin/myprog
    process_name = %(program_name)s
    numprocs = 1
    autostart = false
    autorestart = false
    stopsignal = INT
    startsecs = 0

This program is one that is supposed to run on demand and finishes in less than a second so I cannot increase startsecs. It is, however, failing on start and returning an exit code of 255. I see this in the supervisor log:

    2014-03-20 12:05:12,836 INFO exited: myprog (exit status 255; not expected)

Even though the program dies in an unexpected way, supervisor tells my event listeners that the program simply EXITED rather than FATAL. If I set "autorestart = unexpected" supervisor correctly determines that the program died in an unexpected way and tries to restart it but because it never goes into a FATAL state it just sits there and tries to start over and over and over and over again regardless of the setting for "startretries". This is not ideal.

I'm using supervisor 3.0 and have not incorporated any of the changes since its release. If these are fixed in later versions I'm happy to upgrade.

Is there anything I'm doing wrong with my configs? Or anything I can do to mitigate these problems?

Thank you,
-Paul
_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Reply | Threaded
Open this post in threaded view
|

Re: [Supervisor-users] event listener buffers and state events

marklai
This post has NOT been accepted by the mailing list yet.
Anyone found the solution to the crashmail buffer overflowed?