error message:
uWSGI worker 5 screams: UAAAAAAH my master disconnected: i will kill myself !!!
I use uWSGI as server to hold my pyramid app on Ubuntu 12.04
A little bit of Googling led me to this changeset (only available now in Google's cache) in which uwsgi_receive_signal()
and that error message was added to signal.c
. The current version of the code is here.
If the read()
call returns 0 (meaning 0 bytes were read), then something is wrong with the master and the worker should exit. If the return value is less than 0, this indicates an error and the worker should exit. If the return value was greater than 0, it's a normal situation and the signal should be handled.
It seems there's no way to tell the difference between a worker exiting normally and an error causing the worker to exit because the same message is logged in both cases, so there's no way to be certain of the answer to your question "How it happened."
And that, children, is why log messages are important.
As @roberto mentioned, there might be other messages in the log that may contain more useful information.
There are tons of reasons for the master to die, normally master's death is governed by the user, but if, for some reason, it dies abruptuly, the workers have to follow him. As the worker (being a child) has no way to know what happened, you cannot expect more infos.
A common error is sending KILL to the master to reboot/destroy uWSGI, this will lead to worker being 'orphaned'. Generally master's death should be reported in logs (with a backtrace in case of memory corruption), maybe if you paste them we could find the cause.