Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#927228: supervisor package does not provide logrotate configuration

27 views
Skip to first unread message

Dominic Hopf

unread,
Apr 16, 2019, 10:50:03 AM4/16/19
to
Package: supervisor
Version: 3.3.1-1+deb9u1
Severity: important

Dear Maintainer,

Running dpkg -S supervisor I see that the supervisor package also
provides the directory /var/log/supervisor, but does not provide a
logrotate configuration file in /etc/logrotate.d/ for files placed in
there.

When you have a lot of services managed by supervisor which produce a
lot of output this leads to disk space issues quite fast on productive
servers, thus my rating for this issue as important.


-- System Information:
Debian Release: 9.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages supervisor depends on:
ii init-system-helpers 1.48
ii python 2.7.13-2
ii python-meld3 1.0.2-2
ii python-pkg-resources 33.1.1-1

supervisor recommends no packages.

Versions of packages supervisor suggests:
pn supervisor-doc <none>

-- Configuration Files:
/etc/supervisor/supervisord.conf changed [not included]

-- no debconf information

Stéphane Blondon

unread,
Sep 14, 2023, 3:20:05 AM9/14/23
to
Hello,

Supervisor documentation shows that the rotation of supervisor.log
file is done automatically by supervisord (see
http://supervisord.org/logging.html#activity-log-rotation).

## quote ##
The activity log is “rotated” by supervisord based on the combination
of the logfile_maxbytes and the logfile_backups parameters in the
[supervisord] section of the configuration file. When the activity log
reaches logfile_maxbytes bytes, the current log file is moved to a
backup file and a new activity log file is created.
## end of quote ##

According to http://supervisord.org/configuration.html page, the
configuration of `logfile_maxbytes` and `logfile_backups` have been
introduced in 3.0. As you used 3.3, it should work.

Your report shows the '/etc/supervisor/supervisord.conf changed'. Did
you modify these values? Can you still provide the configuration file
used?

--
Stéphane

Stéphane Blondon

unread,
Sep 14, 2023, 3:20:05 AM9/14/23
to
The e-mail address from the submitter does not work anymore:
550 5.1.1 Recipient address rejected: undeliverable address

So we will never get a reply to my questions.

--
Stéphane

Stéphane Blondon

unread,
Sep 25, 2023, 3:40:04 AM9/25/23
to
I tried with supervisor package (4.2.5-1) and I failed to get a
rotation automatically. The configuration file is not modified so the
default values should be used by supervisord.

Steps:
1. fill /var/log/supervisor/supervisord.log file under 50M:

$ ls -l /var/log/supervisor/supervisord.log
-rw-rw-rw- 1 root root 49994043 24 sept. 10:04
/var/log/supervisor/supervisord.log

$ ls -lh /var/log/supervisor/supervisord.log
-rw-rw-rw- 1 root root 48M 24 sept. 10:04 /var/log/supervisor/supervisord.log


2. Restart supervisord:

$ sudo systemctl stop supervisor.service
$ sudo systemctl start supervisor.service

3. Force supervisor to write on supervisord.log with a crashing daemon:

$ for i in $(seq 1 3000); do {sudo supervisorctl start demo; sleep 10}; done

'demo' crashes everytime. The loop restarts 'demo' because otherwise
'supervisord' set 'demo' process as BACKOFF status after several
attempts. Then, supervisord does not try to restart it again (which is
probably a good strategy).

4. See results:

$ ls -la /var/log/supervisor/supervisord.log
-rw-rw-rw- 1 root root 51476910 25 sept. 09:07
/var/log/supervisor/supervisord.log
$ ls -lh /var/log/supervisor/supervisord.log
-rw-rw-rw- 1 root root 50M 25 sept. 09:07 /var/log/supervisor/supervisord.log

The file is over 50M but there is no rotation:

$ sudo find /var/log -name "supervisord.log*"
/var/log/supervisor/supervisord.log

'/var/log/supervisor/supervisord.log.1' does not exist.

I plan to read source code and probably raise an issue on supervisor
github repository if needed.

--
Stéphane

Stéphane Blondon

unread,
Oct 8, 2023, 9:50:04 AM10/8/23
to
After running the loop much more time, the log file has been rotated:

$ ls -lh /var/log/supervisor/
total 53M
-rw-r--r-- 1 root root 3,0M 8 oct. 14:33 supervisord.log
-rw-rw-rw- 1 root root 51M 26 sept. 16:55 supervisord.log.1
$ ls -l /var/log/supervisor/
total 54184
-rw-r--r-- 1 root root 3041778 8 oct. 14:33 supervisord.log
-rw-rw-rw- 1 root root 52428822 26 sept. 16:55 supervisord.log.1

It seems the rotation occurs when the size goes from 50 to 51M.

The file rotation works so I think this bug report can be closed with
a 'unreproducible' tag.

--
Stéphane
0 new messages