[Pkg-nginx-maintainers] Bug#858595: nginx logrotate doesn't properly switch to new logfiles

Paul Tötterman paul.totterman at gmail.com
Fri Mar 24 08:14:21 UTC 2017


Package: nginx
Version: 1.10.3-1
Severity: normal

Dear Maintainer,

I noticed that access.log.1 kept growing and access.log had size 0. Clearly
logrotate had run, but something doesn't quite work. lsof showed nginx still
having access.log.1 open. It seems that logrotate calls

    invoke-rc.d nginx rotate

, which in turn calls

    start-stop-daemon --stop --signal USR1 --quiet --pidfile $PID --name $NAME

I tried calling invoke-rc.d nginx rotate manually, after which lsof still showed
nginx keeping the old logfiles open.

    systemctl kill -s USR1 --kill-who=main nginx.service

also didn't work, and neither did the same with --kill-who=all

    systemctl restart nginx

did, finally, cause nginx to open the correct logfiles. But it seems unnecessary
heavy handed for log rotation.

Any better ideas?

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

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

Versions of packages nginx depends on:
ii  nginx-light  1.10.3-1

nginx recommends no packages.

nginx suggests no packages.

-- no debconf information



More information about the Pkg-nginx-maintainers mailing list