RE: Unclean restarts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
Not sure if it is related but we have seen problems before that when you
restart apache very often under load it runs out of semaphore. That
might worth looking into.

To clean up semaphores after stopping apache you can try the following:
ipcs -s | grep www-data | awk '{print $2}'|xargs -n 1 ipcrm sem

PLEASE dont run as is, because it might break things. Purely meant to
get you started.

Regards 

> -----Original Message-----
> From: Brian Cohen [mailto:brian@xxxxxxxxxxxxxx] 
> Sent: 28 August 2007 18:06
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re:  Unclean restarts
> 
> Some additional info -- when Apache is running normally (for 
> example, during the middle of the day), we can issue a manual 
> '/etc/init.d/apache reload' and it will work fine. The 
> problems seem to arise some percentage of the time when it 
> tries to run from cron.daily's calling of logrotate/postrotate.
> 
> Thanks--
> 
> Brian J. Cohen
> Intercarve Networks, LLC
> 914.552.1274 [cell]
> 
> 
> Brian Cohen wrote:
> > We are running Apache 1.3.34.
> > 
> > On our Debian 4.0 system, each night cron.daily runs logrotate.
> > Logrotate's postrotate script runs `/etc/init.d/apache reload` (no 
> > errors on stderr). When it is successful, top shows all apache 
> > children go <defunct>, then apache restarts. But more often 
> than not, 
> > all but 2 or 3 apache children die (without top ever showing 
> > <defunct>), the pid file is removed. Those 2 or 3 apache children 
> > continue to live and accept connections, but won't serve 
> any requests. 
> > Since the pid file has been removed, we have to issue a `killall 
> > apache`, then `/etc/init.d/apache start`
> > 
> > The net effect is pretty fatal. If we're not around when it 
> happens, 
> > Apache remains effectively down until we come around to clean it up.
> > 
> > Any help or guidance would be greatly appreciated.
> > 
> > Thanks!
> > 
> > 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux