Jeden Sonntag Apache tot

Plesk, Confixx, Froxlor, SysCP, SeCoTo, IspCP, etc.
Post Reply
tanjix
Posts: 28
Joined: 2006-05-09 21:18
 

Jeden Sonntag Apache tot

Post by tanjix »

Hallo allerseits,

hier ein etwas merkwürdiges Konstrukt unter Debian 3/4 und Confixx 3.x

Jeden Sonntag gegen 06.25 Uhr stürzt der Apache Webserver ab. Log-Auswertungen ergaben, dass zu dieser Zeit das logrotate Script von Confixx aktiv wird.

Im error_log von Apache findet sich:

Code: Select all

[Mon Jul 23 05:20:19 2007] [warn] child process 2732 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 2733 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 2734 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 2735 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 2750 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 2760 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 2761 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 29306 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 29310 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:19 2007] [warn] child process 12566 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2732 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2733 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2734 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2735 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2750 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2760 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 2761 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 29306 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 29310 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:21 2007] [warn] child process 12566 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2732 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2733 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2734 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2735 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2750 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2760 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 2761 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 29306 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 29310 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:23 2007] [warn] child process 12566 still did not exit, sending a SIGTERM
[Mon Jul 23 05:20:25 2007] [error] child process 2732 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 2733 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 2734 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 2735 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 2750 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 2760 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 2761 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 29306 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 29310 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:25 2007] [error] child process 12566 still did not exit, sending a SIGKILL
[Mon Jul 23 05:20:27 2007] [notice] caught SIGTERM, shutting down

Code: Select all

/etc/cron.daily/logrotate:
error: Failed to remove old log /var/log/apache/meinserver.de_access.log.1.gz: No such file or directory (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs
error: error running shared postrotate script for /var/log/apache/meinserver.de_access.log
run-parts: /etc/cron.daily/logrotate exited with return code 1
Der Pfas zu der hier genannten Log-Datei existiert aber - genauso wie das Log an sich.

Vermutlich ist es das logrotate script, da er ja schreibt "could not remove old log". Das Script läuft dann weiter und hält den Apache unten (so weit ich das richtig verstanden habe?).

Ich habe aber nichts an den Scripten geändert, es trat auch nicht gleich nach dem Update auf das neue Confixx auf.

Ich könnte den Apache natürlich jeden Tag um 06:25 Uhr wieder neu starten, aber diese Lösung scheint mir nicht sehr elegant!

Hat jemand einen Tipp bei der Hand?
tanjix
Posts: 28
Joined: 2006-05-09 21:18
 

Re: Jeden Sonntag Apache tot

Post by tanjix »

Hier der Inhalt der /etc/logrotate.d/apache2

Code:

Code: Select all

/var/log/apache2/*.log {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 640 root adm
        sharedscripts
        postrotate
                if [ -f /var/run/apache2.pid ]; then
                        /etc/init.d/apache2 restart > /dev/null
                fi
        endscript
}
Weitere Scripte, die mit apache2 zu tun haben, sind nicht vorhanden.
User avatar
daemotron
Administrator
Administrator
Posts: 2641
Joined: 2004-01-21 17:44
Contact:
 

Re: Jeden Sonntag Apache tot

Post by daemotron »

tanjix wrote:

Code: Select all

postrotate
    if [ -f /var/run/apache2.pid ]; then
        /etc/init.d/apache2 restart > /dev/null
    fi
endscript
Das ist ja brutal. "restart" führt nacheinander "stop" und "start" aus. Dabei wird natürlich das TERM-Signal an die Apache-Prozesse gesendet. "reload" reicht völlig - da wird nur HUP gesendet, das ist viel weicher und genügt i.d.R. beim Postrotate völlig.
tanjix
Posts: 28
Joined: 2006-05-09 21:18
 

Re: Jeden Sonntag Apache tot

Post by tanjix »

Hallo,

dann wäre das vermutlich aber in bug von Debian? Dieses "Verhalten" mit dem Restart scheint Bestandteil der Debian-Paket-Installation...
User avatar
daemotron
Administrator
Administrator
Posts: 2641
Joined: 2004-01-21 17:44
Contact:
 

Re: Jeden Sonntag Apache tot

Post by daemotron »

Trotzdem merkwürdig, dass ein TERM bei einem Prozess mit gerade mal 10 Kindprozessen so lange dauert, dass das Runscript einen Timeout kriegt und ein KILL hinterher jagt. Was beschäftigt denn Deinen Apachen morgens um halb sechs so stark?
Post Reply