0

I have a LAMP setup. I just was debugging an application it and setup server status module.

I get server uptime of up to 29 seconds and then it restarts, at which point my application starts acting weird, not processing ajax post requests properly.

I also notice the following in my apache error log about every 30 seconds:

[Tue Sep 16 01:39:21.948791 2014] [mpm_prefork:notice] [pid 21487] AH00169: caught SIGTERM, shutting down
[Tue Sep 16 01:39:22.239043 2014] [mpm_prefork:notice] [pid 21549] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Tue Sep 16 01:39:22.239171 2014] [core:notice] [pid 21549] AH00094: Command line: '/usr/sbin/apache2'

Anyone has any ideas what could cause this? Or if there is any other info necessary.

EDIT:

Syslog has these repeating:

Sep 16 01:42:26 nocmonitor monit[1149]: 'apache' trying to restart
Sep 16 01:42:26 nocmonitor monit[1149]: 'apache' stop: /etc/init.d/apache2
Sep 16 01:42:26 nocmonitor monit[1149]: 'apache' start: /etc/init.d/apache2
Sep 16 01:42:56 nocmonitor monit[1149]: 'apache' failed protocol test [HTTP] at INET[server_url:80/index.html] via TCP -- HTTP error: Server returned status 404#012
3
  • 1
    What do your system logs say?
    – EEAA
    Sep 16, 2014 at 1:43
  • It does confirm the behavior, see edit. Sep 16, 2014 at 1:45
  • 1
    So is your whole server restarting or just apache?
    – EEAA
    Sep 16, 2014 at 1:46

1 Answer 1

1

The syslog messages you posted tell the whole story. You have monit configured to check on apache. It is getting a 404 error from the URL you have it configured to check (server_url:80/index.html), which it assumes is not desired behavior, so it restarts apache.

Stop monit and the behavior should cease. Then examine and fix your monit configuraiton.

3
  • Thank you. I forgot that my IT dept got monit setup on this system. Sep 16, 2014 at 1:50
  • @TimZhukov-Khovanskiy Glad I could help. Next time, you might consider reading the logs before assuming there's some mysterious problem. :)
    – EEAA
    Sep 16, 2014 at 1:52
  • I hate monit :) Sep 16, 2014 at 7:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .