Add greenlet tracing code in snf-common
Add greenlet tracing code in snf-common, useful for debugging stuck gevent gunicorn workers. If the environmental variable SYNNEFO_TRACE is set to a non-empty string, the tracing code will install a SIGTRAP signal handler for the process, after the Synnefo settings have been imported. Sending a SIGTRAP signal to the process (eg a gevent gunicorn worker) will then print the stack trace of each greenlet spawned within the process to stderr.
Showing with 102 additions and 4 deletions