Current time: 05-05-2024, 09:23 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Erledigt] Apache startet selbständig neu
Author Message
ThK Offline
Junior Member
*

Posts: 44
Joined: May 2009
Reputation: 0
Post: #1
[Erledigt] Apache startet selbständig neu
Und wieder eine neue "Anfänger" Frage.
Aus irgendeinem Grund startet mein Apache nach 4 Tagen sich selbständig neu...
Da es fast immer zur gleichen Zeit passiert ~ 6:00 Uhr, hört sich das doch fast nach einem Cronjob an ...
Nur welcher Standard Cronjob aus dem ganzen Pool, ISPCP, awstats, Backups, etc ... könnte dies auslösen?
(This post was last modified: 06-30-2009 08:25 PM by ThK.)
06-26-2009 09:21 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: Apache startet selbständig neu
"Eigentlich" keiner.
Am besten schaust Du mal in deine syslog unter /var/log/ um diese Uhrzeit.
Wobei neustarten doch kein Problem ist oder ? Schlimmer wäre wenn er sich selber beendet.

Greez BeNe
06-26-2009 10:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ThK Offline
Junior Member
*

Posts: 44
Joined: May 2009
Reputation: 0
Post: #3
RE: Apache startet selbständig neu
Das alte Logfile dazu hab ich natürlich nicht mehr Wink
Also abwarten bis das wieder passiert ist.

Ein "apache2 restart" sollte nicht schlimm sein da er ja in Sekundenbruchteile wieder da ist.
Aber würde trotzdem schon gern wissen warum das so ist !
(This post was last modified: 06-26-2009 10:25 PM by ThK.)
06-26-2009 10:24 PM
Find all posts by this user Quote this message in a reply
ThK Offline
Junior Member
*

Posts: 44
Joined: May 2009
Reputation: 0
Post: #4
RE: Apache startet selbständig neu
So dann hier mal die Logfile Auszüge Wink

default-error.log vom Apache
[Sun Jun 28 06:25:10 2009] [notice] SIGUSR1 received. Doing graceful restart

Dazu dann in der syslog
Jun 28 06:25:01 dawn /usr/bin/crontab[7482]: (root) LIST (nobody)
Jun 28 06:25:10 dawn kernel: imklog 3.18.6, log source = /proc/kmsg started.
Jun 28 06:25:10 dawn rsyslogd: [origin software="rsyslogd" swVersion="3.18.6" x-pid="2186" x-info="http://www.rsyslog.com"] restart

Wofür ist das rsyslogd installiert?
Kam das mit ISPCP? Bin mir nämlich nicht bewusst das für irgendetwas drauf gepackt zu haben Wink
06-28-2009 04:58 PM
Find all posts by this user Quote this message in a reply
nuke3d Offline
Junior Member
*

Posts: 107
Joined: Sep 2007
Reputation: 1
Post: #5
RE: Apache startet selbständig neu
Schau mal in "/etc/logrotate.d/apache2", bei mir ist da ein apache2 reload drin. Früher war das afaik "restart".
06-28-2009 05:47 PM
Find all posts by this user Quote this message in a reply
menki Offline
Member
***

Posts: 643
Joined: May 2008
Reputation: 0
Post: #6
RE: Apache startet selbständig neu
na ja das was du siehst ist ein reload bzw. ein gracefull restart. das macht der apache um seine prozesse etwas aufzuräumen und den speicher freizugeben...das ist auch gut so.

ich bin kein so grosser fan von nicht kontrolierten apache restarts. mir ist es mehrmals passiert (ispcp crons) das bei einem apache restart nicht alle apache childs beendet wurden. somit konnte der apache nicht wieder starten (offene instanzen im speicher) und blieb einfach offline.
ich mache seitdem immer apache reloads und gelegentlich einen kontrollierten apache restart. Smile

MENKI
(This post was last modified: 06-28-2009 06:32 PM by menki.)
06-28-2009 06:31 PM
Find all posts by this user Quote this message in a reply
nuke3d Offline
Junior Member
*

Posts: 107
Joined: Sep 2007
Reputation: 1
Post: #7
RE: Apache startet selbständig neu
Hatte das Problem mit den unbeendeten Children auch. Dieses Script in nem Cron hat geholfen:
Code:
#!/bin/bash

# Created  2007-11-11 JU
# Modified 2008-05-06 JU

# Workaround for https://bugs.launchpad.net/ubuntu/+source/php5/+bug/162082
#
# What it does:
# Kill all '/usr/lib/cgi-bin/php' processes that have init
# parent is init.
# That is, kill all orphaned php CGI processes.
# Log some useful info when kill something, 'x' otherwise.


LOGF=/root/phpkiller.log
CGI_EXE=/usr/bin/php5-cgi

if pgrep -f -x $CGI_EXE -P 1 > /dev/null
then
echo >> $LOGF
date >> $LOGF
pstree -uAp >> $LOGF
pgrep -f -x $CGI_EXE -P 1 >> $LOGF
echo >> $LOGF
pkill -f -x $CGI_EXE -P 1
else
echo -n x >> $LOGF
fi

Seit ich auf fcgid umgestiegen bin brauch ich das allerdings nicht mehr...
06-28-2009 06:39 PM
Find all posts by this user Quote this message in a reply
menki Offline
Member
***

Posts: 643
Joined: May 2008
Reputation: 0
Post: #8
RE: Apache startet selbständig neu
die /etc/logrotate.d/ispcp habe ich so angepasst:

Code:
/var/log/apache2/users/*.log {
  weekly
  missingok
  rotate 52
  compress
  delaycompress
  notifempty
  create 640 root adm
  sharedscripts
  prerotate
    /var/www/ispcp/engine/traffic/ispcp-vrl-traff > /var/log/ispcp/ispcp-vrl-traff.log
  endscript
  postrotate
    /etc/init.d/apache2 reload > /dev/null
  endscript
}

oder den apache restart drin lassen und eine restart pause von 3 sek. in das skript implementieren. also zwischen stop und start... Wink damit hat der apache zeit alles zu beenden bevor das skript den apachen neustarten tut.

grüße

MENKI
(This post was last modified: 06-28-2009 11:56 PM by menki.)
06-28-2009 06:51 PM
Find all posts by this user Quote this message in a reply
ThK Offline
Junior Member
*

Posts: 44
Joined: May 2009
Reputation: 0
Post: #9
RE: Apache startet selbständig neu
Also die Childrens killt er bisher immer ganz brav.
Heisst also ich kann erst einmal alles so lassen da es ja kein Problem beim Restart gibt?

Was bewirkt die Änderung der /etc/logrotate.d/ispcp wie von menki geschrieben?
06-29-2009 06:33 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)