Supervisor: How to make Supervisor reopen logs for of one the managed processes?

Created on 9 May 2018  路  2Comments  路  Source: Supervisor/supervisor

I deleted a log file of one the managed processes (stdout). Supervisor is still writing the logs into it.

I want to recreate the log file right now, but I can't afford to restart the process (for example because I don't want downtime).

Is it possible to make Supervisor reopen logs for a process?

Another wish is to be able to tell Supervisor to reopen the log file(s) while the closed logs to be renamed.

This would be useful for backing up the logs. I would tell Supervisor to reopen the log and then would compress, back up and delete the old one. I need this because logrotate fails sometimes: gzip: stdin: file size changed while zipping. delaycompress option for logrotate doesn't suit me, because I need to clean disk space right now by reopening the logs and backing up the old ones, then deleting them.

So it's like stdout_logfile_maxbytes but on demand.

logging signals

Most helpful comment

Is it possible to make Supervisor reopen logs for a process?

SIGUSR2

Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.

All 2 comments

Is it possible to make Supervisor reopen logs for a process?

SIGUSR2

Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felipemachado-sambatech picture felipemachado-sambatech  路  74Comments

ghost picture ghost  路  25Comments

mminer picture mminer  路  41Comments

flaugher picture flaugher  路  30Comments

jvanasco picture jvanasco  路  46Comments