0

Sometimes, Apache decides not to shut down nicely. killall apache2 or kill -9 (apache2 PID here) shuts it down so that it can actually start back up without the port being in use. Other posts seem to indicate that PHP 5.2 might have issues hanging up Apache. I'm using the worker MPM on an x86_64 Gentoo Linux system if that helps.

Any other things I should consider hanging up Apache besides PHP? Should I be stopping Apache with /etc/init.d/apache2 gracefulstop instead of /etc/init.d/apache2 stop?

  • 1
    Are you using mod_php or CGI? If CGI are you using just CGI by itself or mod_fastcgi or mod_fcgid? – DerfK Jan 05 '11 at 18:59
  • I'm using mod_php. – ZiggyTheHamster Jan 26 '11 at 22:02
  • You should switch to the new PHP slotting system, which allows 5.2 and 5.3 to coexist, because there are no more updates to the (5) slot. You will have 5.2.17 in the new (5.2) slot, which may solve that problem. I have the same apache version, worker, x86_64 on a large traffic server with PHP 5.2.17, without issues. See this howto: http://www.gentoo.org/proj/en/php/php-upgrading.xml – Prof. Moriarty Feb 18 '11 at 01:50
  • I haven't updated my question but I did switch to the :5.2 slot. Didn't help. What did help is switching to the prefork MPM. – ZiggyTheHamster Mar 11 '11 at 16:25

1 Answers1

0

Switching to the prefork MPM fixed this problem at the expense of more memory usage. My guess is that there's some sort of concurrency issue that prevents all of the worker threads from stopping correctly. Also PHP doesn't recommend using anything besides prefork, so there's probably a good reason for that.