Skip to content

Set process name for long-running processes

Vermaat requested to merge proc-name into master

For long-running processes it can be convenient to have a short and human-readable process name. For example, in our typical server configuration we have quite a few Mutalyzer processes running with very long process names, making ps and top output hard to parse.

It is assumed that in production environments the webservices and website are ran in a separate WSGI server such as Gunicorn which can be configured to set the process name.

The setproctitle dependency for this feature is a C extension and we therefore make it a soft dependency. Construction copied from Gunicorn:

https://github.com/benoitc/gunicorn/blob/5bc13be79ecaf8f1027764c600023f674ebcf5b2/gunicorn/util.py#L55

Merge request reports