Bug #902
closedSIGHUP for log reopening is not pass to child (with server.max-worker = 4)
Description
I have running Lighttpd on download server for a long time, but as I see in the last 2 month, Lighttpd did not handle many concurrent connections well, so I try setting server.max-worker = 4 which solved my problem with concurrent connections, but log rotation by newsyslog.conf on FreeBSD 6.0 stop working.
line from /etc/newsyslog.conf
/var/log/lighttpd/*.log www:wheel 644 10 500000 168 GWZ /var/run/lighttpd.pid
This works in case Lighttpd runs as single process, but if Lighttpd has some child, child did not reopen log file when parent get SIGHUP. Even killall -HUP lighttpd doesn't solve this problem, only restart of daemon.
runing processes of Lighttpd:
| |-+- 15017 www /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf | | |--- 15019 www /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf | | |--- 15020 www /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf | | |--- 15021 www /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf | | \--- 15022 www /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf
openned log files (there are 2 files = error.log and access.log):
# fstat | grep lighttpd | grep /var/log USER CMD PID FD MOUNT INUM MODE SZ|DV R/W www lighttpd 15022 3 /var/log 70657 -rw-r--r-- 1607736638 w www lighttpd 15022 5 /var/log 70661 -rw-r--r-- 2650051 w www lighttpd 15021 3 /var/log 70657 -rw-r--r-- 1607736638 w www lighttpd 15021 5 /var/log 70661 -rw-r--r-- 2650051 w www lighttpd 15020 3 /var/log 70657 -rw-r--r-- 1607736638 w www lighttpd 15020 5 /var/log 70661 -rw-r--r-- 2650051 w www lighttpd 15019 3 /var/log 70657 -rw-r--r-- 1607736638 w www lighttpd 15019 5 /var/log 70661 -rw-r--r-- 2650051 w www lighttpd 15017 3 /var/log 70657 -rw-r--r-- 1607736638 w www lighttpd 15017 5 /var/log 70661 -rw-r--r-- 2650051 w
but those files (inodes) is not referenced after logrotation by newsyslog:
ls -i 70659 access.log 70695 downloadManager.log.4.gz 70679 access.log.0.gz 70693 downloadManager.log.5.gz 70676 access.log.1.gz 70678 downloadManager.log.6.gz 70662 access.log.10.gz 70677 downloadManager.log.7.gz 70660 access.log.2.gz 70684 downloadManager.log.8.gz 70669 access.log.3.gz 70665 downloadManager.log.9.gz 70667 access.log.4.gz 70686 error.log 70672 access.log.5.gz 70697 error.log.0.gz 70670 access.log.6.gz 70674 error.log.1.gz 70663 access.log.7.gz 70682 error.log.10.gz 70668 access.log.8.gz 70688 error.log.2.gz 70664 access.log.9.gz 70691 error.log.3.gz 70675 downloadManager.log 70696 error.log.4.gz 70690 downloadManager.log.0.gz 70694 error.log.5.gz 70673 downloadManager.log.1.gz 70692 error.log.6.gz 70681 downloadManager.log.10.gz 70689 error.log.7.gz 70680 downloadManager.log.2.gz 70685 error.log.8.gz 70683 downloadManager.log.3.gz 70666 error.log.9.gz
so du
shows directory size about 111MB, but df -h
shows 1.5GB on log partition.
- lighttpd -v
lighttpd-1.4.13 (ssl) - a light and fast webserver
Build-Date: Nov 4 2006 02:08:22
FreeBSD 6.0-STABLE FreeBSD 6.0-STABLE #0: Fri Jan 20 09:15:07 CET 2006 root@:/usr/obj/usr/src/sys/IBM336_SMP60 i386
Machine has 2 Xeons on 2.6GHz and 2GB of RAM running SMP kernel.
Let me know if you need some more details.
-- bspinner
Updated by jan about 17 years ago
- Status changed from New to Fixed
- Resolution set to fixed
fixed in r1982 for 1.4.x
Also available in: Atom