apache2 restarts every minute

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I use monit for monitoring all services on my system and recently I add Apache2 ( 2.4 ) to it. Just to mention I use Debian 8 on ARM system.I use init.d and not systemd.



After I add Apache and config it use "mpm_prefork" module , and remove many modules from "enabled" modules, to get it more light-weight.



All these not help me and I still get Apache2 restarts every minutes.



Did anyone have such experience and troubleshoot such problem ?



Logs from error.log of apache




[Sun Oct 29 15:14:08.030632 2017] [mpm_prefork:info] [pid 16630] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:08.030715 2017] [core:notice] [pid 16630] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:08.030833 2017] [mpm_prefork:debug] [pid 16630] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:08.030914 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Initializing Python.
[Sun Oct 29 15:14:08.034578 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Initializing Python.
[Sun Oct 29 15:14:08.036867 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Initializing Python.
[Sun Oct 29 15:14:08.043898 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Initializing Python.
[Sun Oct 29 15:14:08.111007 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Attach interpreter ''.
[Sun Oct 29 15:14:08.112918 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Attach interpreter ''.
[Sun Oct 29 15:14:08.156439 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Attach interpreter ''.
[Sun Oct 29 15:14:08.156429 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Attach interpreter ''.
[Sun Oct 29 15:14:08.179340 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Attach interpreter ''.
[Sun Oct 29 15:14:09.332620 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Destroying interpreters.
[Sun Oct 29 15:14:09.332740 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Destroying interpreters.
[Sun Oct 29 15:14:09.332637 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Destroying interpreters.
[Sun Oct 29 15:14:09.332863 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332875 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332901 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.335278 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Destroying interpreters.
[Sun Oct 29 15:14:09.335482 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332621 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Destroying interpreters.
[Sun Oct 29 15:14:09.338731 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.348660 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Terminating Python.
[Sun Oct 29 15:14:09.350305 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Terminating Python.
[Sun Oct 29 15:14:09.354130 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Terminating Python.
[Sun Oct 29 15:14:09.354114 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Terminating Python.
[Sun Oct 29 15:14:09.359654 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Terminating Python.
[Sun Oct 29 15:14:09.369674 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Python has shutdown.
[Sun Oct 29 15:14:09.372697 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Python has shutdown.
[Sun Oct 29 15:14:09.372828 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Python has shutdown.
[Sun Oct 29 15:14:09.383463 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Python has shutdown.
[Sun Oct 29 15:14:09.388690 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Python has shutdown.
[Sun Oct 29 15:14:09.414820 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16632 (gen 0/slot 0) exited
[Sun Oct 29 15:14:09.414981 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16633 (gen 0/slot 1) exited
[Sun Oct 29 15:14:09.415094 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16635 (gen 0/slot 2) exited
[Sun Oct 29 15:14:09.415208 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16637 (gen 0/slot 3) exited
[Sun Oct 29 15:14:09.415312 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16638 (gen 0/slot 4) exited
[Sun Oct 29 15:14:09.415451 2017] [core:info] [pid 16630] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=16630)
[Sun Oct 29 15:14:09.415501 2017] [mpm_prefork:notice] [pid 16630] AH00169: caught SIGTERM, shutting down
[Sun Oct 29 15:14:09.425704 2017] [core:trace4] [pid 16630] mpm_common.c(430): end of generation 0
[Sun Oct 29 15:14:10.901639 2017] [wsgi:warn] [pid 16702] mod_wsgi: Compiled for Python/2.7.8.
[Sun Oct 29 15:14:10.901734 2017] [wsgi:warn] [pid 16702] mod_wsgi: Runtime using Python/2.7.9.
[Sun Oct 29 15:14:10.904197 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16705 (gen 0/slot 0) started
[Sun Oct 29 15:14:10.905865 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16706 (gen 0/slot 1) started
[Sun Oct 29 15:14:10.906179 2017] [wsgi:info] [pid 16705] mod_wsgi (pid=16705): Initializing Python.
[Sun Oct 29 15:14:10.907856 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16707 (gen 0/slot 2) started
[Sun Oct 29 15:14:10.907795 2017] [wsgi:info] [pid 16706] mod_wsgi (pid=16706): Initializing Python.
[Sun Oct 29 15:14:10.909754 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16708 (gen 0/slot 3) started
[Sun Oct 29 15:14:10.910568 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Initializing Python.
[Sun Oct 29 15:14:10.911443 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16709 (gen 0/slot 4) started
[Sun Oct 29 15:14:10.911602 2017] [mpm_prefork:notice] [pid 16702] AH00163: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Oct 29 15:14:10.911672 2017] [mpm_prefork:info] [pid 16702] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:10.911767 2017] [core:notice] [pid 16702] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:10.912079 2017] [mpm_prefork:debug] [pid 16702] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:10.913539 2017] [wsgi:info] [pid 16709] mod_wsgi (pid=16709): Initializing Python.
[Sun Oct 29 15:14:10.914593 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Initializing Python.
[Sun Oct 29 15:14:10.989894 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Attach interpreter ''.
[Sun Oct 29 15:14:10.992852 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Attach interpreter ''.








share|improve this question






















  • Are there any clues in your error log file... sudo cat /var/log/apache2/error.log
    – RubberStamp
    Oct 28 '17 at 14:29










  • As @RubberStamp has implied, we need more and detailed information to help. How do you know apache is restarting every minute -- what log entries indicate this? Do they include any error messages? Maybe consider reading this: unix.stackexchange.com/help/how-to-ask
    – 0xSheepdog
    Oct 28 '17 at 15:24










  • the pid location changes between versions. Are you pointing to the wrong apache.pid location in monit?
    – Rui F Ribeiro
    Oct 28 '17 at 21:48










  • Are you using python? If not, try disabling the wsgi module and see if the problem goes away... a2dismod wsgi ... You may also want to try switching to the itk module instead: Apache 2 ITK MPM it's available on Debian 8 ... and the mpm_prefork module seems to have been removed from Debian 9, in favor of itk
    – RubberStamp
    Oct 30 '17 at 0:55











  • I using python , or more correct I use flask
    – Sergey Meerovich
    Oct 30 '17 at 10:44














up vote
0
down vote

favorite












I use monit for monitoring all services on my system and recently I add Apache2 ( 2.4 ) to it. Just to mention I use Debian 8 on ARM system.I use init.d and not systemd.



After I add Apache and config it use "mpm_prefork" module , and remove many modules from "enabled" modules, to get it more light-weight.



All these not help me and I still get Apache2 restarts every minutes.



Did anyone have such experience and troubleshoot such problem ?



Logs from error.log of apache




[Sun Oct 29 15:14:08.030632 2017] [mpm_prefork:info] [pid 16630] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:08.030715 2017] [core:notice] [pid 16630] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:08.030833 2017] [mpm_prefork:debug] [pid 16630] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:08.030914 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Initializing Python.
[Sun Oct 29 15:14:08.034578 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Initializing Python.
[Sun Oct 29 15:14:08.036867 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Initializing Python.
[Sun Oct 29 15:14:08.043898 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Initializing Python.
[Sun Oct 29 15:14:08.111007 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Attach interpreter ''.
[Sun Oct 29 15:14:08.112918 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Attach interpreter ''.
[Sun Oct 29 15:14:08.156439 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Attach interpreter ''.
[Sun Oct 29 15:14:08.156429 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Attach interpreter ''.
[Sun Oct 29 15:14:08.179340 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Attach interpreter ''.
[Sun Oct 29 15:14:09.332620 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Destroying interpreters.
[Sun Oct 29 15:14:09.332740 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Destroying interpreters.
[Sun Oct 29 15:14:09.332637 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Destroying interpreters.
[Sun Oct 29 15:14:09.332863 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332875 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332901 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.335278 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Destroying interpreters.
[Sun Oct 29 15:14:09.335482 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332621 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Destroying interpreters.
[Sun Oct 29 15:14:09.338731 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.348660 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Terminating Python.
[Sun Oct 29 15:14:09.350305 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Terminating Python.
[Sun Oct 29 15:14:09.354130 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Terminating Python.
[Sun Oct 29 15:14:09.354114 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Terminating Python.
[Sun Oct 29 15:14:09.359654 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Terminating Python.
[Sun Oct 29 15:14:09.369674 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Python has shutdown.
[Sun Oct 29 15:14:09.372697 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Python has shutdown.
[Sun Oct 29 15:14:09.372828 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Python has shutdown.
[Sun Oct 29 15:14:09.383463 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Python has shutdown.
[Sun Oct 29 15:14:09.388690 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Python has shutdown.
[Sun Oct 29 15:14:09.414820 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16632 (gen 0/slot 0) exited
[Sun Oct 29 15:14:09.414981 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16633 (gen 0/slot 1) exited
[Sun Oct 29 15:14:09.415094 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16635 (gen 0/slot 2) exited
[Sun Oct 29 15:14:09.415208 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16637 (gen 0/slot 3) exited
[Sun Oct 29 15:14:09.415312 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16638 (gen 0/slot 4) exited
[Sun Oct 29 15:14:09.415451 2017] [core:info] [pid 16630] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=16630)
[Sun Oct 29 15:14:09.415501 2017] [mpm_prefork:notice] [pid 16630] AH00169: caught SIGTERM, shutting down
[Sun Oct 29 15:14:09.425704 2017] [core:trace4] [pid 16630] mpm_common.c(430): end of generation 0
[Sun Oct 29 15:14:10.901639 2017] [wsgi:warn] [pid 16702] mod_wsgi: Compiled for Python/2.7.8.
[Sun Oct 29 15:14:10.901734 2017] [wsgi:warn] [pid 16702] mod_wsgi: Runtime using Python/2.7.9.
[Sun Oct 29 15:14:10.904197 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16705 (gen 0/slot 0) started
[Sun Oct 29 15:14:10.905865 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16706 (gen 0/slot 1) started
[Sun Oct 29 15:14:10.906179 2017] [wsgi:info] [pid 16705] mod_wsgi (pid=16705): Initializing Python.
[Sun Oct 29 15:14:10.907856 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16707 (gen 0/slot 2) started
[Sun Oct 29 15:14:10.907795 2017] [wsgi:info] [pid 16706] mod_wsgi (pid=16706): Initializing Python.
[Sun Oct 29 15:14:10.909754 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16708 (gen 0/slot 3) started
[Sun Oct 29 15:14:10.910568 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Initializing Python.
[Sun Oct 29 15:14:10.911443 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16709 (gen 0/slot 4) started
[Sun Oct 29 15:14:10.911602 2017] [mpm_prefork:notice] [pid 16702] AH00163: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Oct 29 15:14:10.911672 2017] [mpm_prefork:info] [pid 16702] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:10.911767 2017] [core:notice] [pid 16702] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:10.912079 2017] [mpm_prefork:debug] [pid 16702] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:10.913539 2017] [wsgi:info] [pid 16709] mod_wsgi (pid=16709): Initializing Python.
[Sun Oct 29 15:14:10.914593 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Initializing Python.
[Sun Oct 29 15:14:10.989894 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Attach interpreter ''.
[Sun Oct 29 15:14:10.992852 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Attach interpreter ''.








share|improve this question






















  • Are there any clues in your error log file... sudo cat /var/log/apache2/error.log
    – RubberStamp
    Oct 28 '17 at 14:29










  • As @RubberStamp has implied, we need more and detailed information to help. How do you know apache is restarting every minute -- what log entries indicate this? Do they include any error messages? Maybe consider reading this: unix.stackexchange.com/help/how-to-ask
    – 0xSheepdog
    Oct 28 '17 at 15:24










  • the pid location changes between versions. Are you pointing to the wrong apache.pid location in monit?
    – Rui F Ribeiro
    Oct 28 '17 at 21:48










  • Are you using python? If not, try disabling the wsgi module and see if the problem goes away... a2dismod wsgi ... You may also want to try switching to the itk module instead: Apache 2 ITK MPM it's available on Debian 8 ... and the mpm_prefork module seems to have been removed from Debian 9, in favor of itk
    – RubberStamp
    Oct 30 '17 at 0:55











  • I using python , or more correct I use flask
    – Sergey Meerovich
    Oct 30 '17 at 10:44












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I use monit for monitoring all services on my system and recently I add Apache2 ( 2.4 ) to it. Just to mention I use Debian 8 on ARM system.I use init.d and not systemd.



After I add Apache and config it use "mpm_prefork" module , and remove many modules from "enabled" modules, to get it more light-weight.



All these not help me and I still get Apache2 restarts every minutes.



Did anyone have such experience and troubleshoot such problem ?



Logs from error.log of apache




[Sun Oct 29 15:14:08.030632 2017] [mpm_prefork:info] [pid 16630] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:08.030715 2017] [core:notice] [pid 16630] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:08.030833 2017] [mpm_prefork:debug] [pid 16630] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:08.030914 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Initializing Python.
[Sun Oct 29 15:14:08.034578 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Initializing Python.
[Sun Oct 29 15:14:08.036867 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Initializing Python.
[Sun Oct 29 15:14:08.043898 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Initializing Python.
[Sun Oct 29 15:14:08.111007 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Attach interpreter ''.
[Sun Oct 29 15:14:08.112918 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Attach interpreter ''.
[Sun Oct 29 15:14:08.156439 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Attach interpreter ''.
[Sun Oct 29 15:14:08.156429 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Attach interpreter ''.
[Sun Oct 29 15:14:08.179340 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Attach interpreter ''.
[Sun Oct 29 15:14:09.332620 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Destroying interpreters.
[Sun Oct 29 15:14:09.332740 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Destroying interpreters.
[Sun Oct 29 15:14:09.332637 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Destroying interpreters.
[Sun Oct 29 15:14:09.332863 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332875 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332901 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.335278 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Destroying interpreters.
[Sun Oct 29 15:14:09.335482 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332621 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Destroying interpreters.
[Sun Oct 29 15:14:09.338731 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.348660 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Terminating Python.
[Sun Oct 29 15:14:09.350305 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Terminating Python.
[Sun Oct 29 15:14:09.354130 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Terminating Python.
[Sun Oct 29 15:14:09.354114 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Terminating Python.
[Sun Oct 29 15:14:09.359654 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Terminating Python.
[Sun Oct 29 15:14:09.369674 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Python has shutdown.
[Sun Oct 29 15:14:09.372697 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Python has shutdown.
[Sun Oct 29 15:14:09.372828 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Python has shutdown.
[Sun Oct 29 15:14:09.383463 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Python has shutdown.
[Sun Oct 29 15:14:09.388690 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Python has shutdown.
[Sun Oct 29 15:14:09.414820 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16632 (gen 0/slot 0) exited
[Sun Oct 29 15:14:09.414981 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16633 (gen 0/slot 1) exited
[Sun Oct 29 15:14:09.415094 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16635 (gen 0/slot 2) exited
[Sun Oct 29 15:14:09.415208 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16637 (gen 0/slot 3) exited
[Sun Oct 29 15:14:09.415312 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16638 (gen 0/slot 4) exited
[Sun Oct 29 15:14:09.415451 2017] [core:info] [pid 16630] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=16630)
[Sun Oct 29 15:14:09.415501 2017] [mpm_prefork:notice] [pid 16630] AH00169: caught SIGTERM, shutting down
[Sun Oct 29 15:14:09.425704 2017] [core:trace4] [pid 16630] mpm_common.c(430): end of generation 0
[Sun Oct 29 15:14:10.901639 2017] [wsgi:warn] [pid 16702] mod_wsgi: Compiled for Python/2.7.8.
[Sun Oct 29 15:14:10.901734 2017] [wsgi:warn] [pid 16702] mod_wsgi: Runtime using Python/2.7.9.
[Sun Oct 29 15:14:10.904197 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16705 (gen 0/slot 0) started
[Sun Oct 29 15:14:10.905865 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16706 (gen 0/slot 1) started
[Sun Oct 29 15:14:10.906179 2017] [wsgi:info] [pid 16705] mod_wsgi (pid=16705): Initializing Python.
[Sun Oct 29 15:14:10.907856 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16707 (gen 0/slot 2) started
[Sun Oct 29 15:14:10.907795 2017] [wsgi:info] [pid 16706] mod_wsgi (pid=16706): Initializing Python.
[Sun Oct 29 15:14:10.909754 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16708 (gen 0/slot 3) started
[Sun Oct 29 15:14:10.910568 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Initializing Python.
[Sun Oct 29 15:14:10.911443 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16709 (gen 0/slot 4) started
[Sun Oct 29 15:14:10.911602 2017] [mpm_prefork:notice] [pid 16702] AH00163: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Oct 29 15:14:10.911672 2017] [mpm_prefork:info] [pid 16702] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:10.911767 2017] [core:notice] [pid 16702] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:10.912079 2017] [mpm_prefork:debug] [pid 16702] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:10.913539 2017] [wsgi:info] [pid 16709] mod_wsgi (pid=16709): Initializing Python.
[Sun Oct 29 15:14:10.914593 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Initializing Python.
[Sun Oct 29 15:14:10.989894 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Attach interpreter ''.
[Sun Oct 29 15:14:10.992852 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Attach interpreter ''.








share|improve this question














I use monit for monitoring all services on my system and recently I add Apache2 ( 2.4 ) to it. Just to mention I use Debian 8 on ARM system.I use init.d and not systemd.



After I add Apache and config it use "mpm_prefork" module , and remove many modules from "enabled" modules, to get it more light-weight.



All these not help me and I still get Apache2 restarts every minutes.



Did anyone have such experience and troubleshoot such problem ?



Logs from error.log of apache




[Sun Oct 29 15:14:08.030632 2017] [mpm_prefork:info] [pid 16630] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:08.030715 2017] [core:notice] [pid 16630] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:08.030833 2017] [mpm_prefork:debug] [pid 16630] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:08.030914 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Initializing Python.
[Sun Oct 29 15:14:08.034578 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Initializing Python.
[Sun Oct 29 15:14:08.036867 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Initializing Python.
[Sun Oct 29 15:14:08.043898 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Initializing Python.
[Sun Oct 29 15:14:08.111007 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Attach interpreter ''.
[Sun Oct 29 15:14:08.112918 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Attach interpreter ''.
[Sun Oct 29 15:14:08.156439 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Attach interpreter ''.
[Sun Oct 29 15:14:08.156429 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Attach interpreter ''.
[Sun Oct 29 15:14:08.179340 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Attach interpreter ''.
[Sun Oct 29 15:14:09.332620 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Destroying interpreters.
[Sun Oct 29 15:14:09.332740 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Destroying interpreters.
[Sun Oct 29 15:14:09.332637 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Destroying interpreters.
[Sun Oct 29 15:14:09.332863 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332875 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332901 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.335278 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Destroying interpreters.
[Sun Oct 29 15:14:09.335482 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.332621 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Destroying interpreters.
[Sun Oct 29 15:14:09.338731 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Cleanup interpreter ''.
[Sun Oct 29 15:14:09.348660 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Terminating Python.
[Sun Oct 29 15:14:09.350305 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Terminating Python.
[Sun Oct 29 15:14:09.354130 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Terminating Python.
[Sun Oct 29 15:14:09.354114 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Terminating Python.
[Sun Oct 29 15:14:09.359654 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Terminating Python.
[Sun Oct 29 15:14:09.369674 2017] [wsgi:info] [pid 16638] mod_wsgi (pid=16638): Python has shutdown.
[Sun Oct 29 15:14:09.372697 2017] [wsgi:info] [pid 16637] mod_wsgi (pid=16637): Python has shutdown.
[Sun Oct 29 15:14:09.372828 2017] [wsgi:info] [pid 16633] mod_wsgi (pid=16633): Python has shutdown.
[Sun Oct 29 15:14:09.383463 2017] [wsgi:info] [pid 16635] mod_wsgi (pid=16635): Python has shutdown.
[Sun Oct 29 15:14:09.388690 2017] [wsgi:info] [pid 16632] mod_wsgi (pid=16632): Python has shutdown.
[Sun Oct 29 15:14:09.414820 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16632 (gen 0/slot 0) exited
[Sun Oct 29 15:14:09.414981 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16633 (gen 0/slot 1) exited
[Sun Oct 29 15:14:09.415094 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16635 (gen 0/slot 2) exited
[Sun Oct 29 15:14:09.415208 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16637 (gen 0/slot 3) exited
[Sun Oct 29 15:14:09.415312 2017] [core:trace4] [pid 16630] mpm_common.c(534): mpm child 16638 (gen 0/slot 4) exited
[Sun Oct 29 15:14:09.415451 2017] [core:info] [pid 16630] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=16630)
[Sun Oct 29 15:14:09.415501 2017] [mpm_prefork:notice] [pid 16630] AH00169: caught SIGTERM, shutting down
[Sun Oct 29 15:14:09.425704 2017] [core:trace4] [pid 16630] mpm_common.c(430): end of generation 0
[Sun Oct 29 15:14:10.901639 2017] [wsgi:warn] [pid 16702] mod_wsgi: Compiled for Python/2.7.8.
[Sun Oct 29 15:14:10.901734 2017] [wsgi:warn] [pid 16702] mod_wsgi: Runtime using Python/2.7.9.
[Sun Oct 29 15:14:10.904197 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16705 (gen 0/slot 0) started
[Sun Oct 29 15:14:10.905865 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16706 (gen 0/slot 1) started
[Sun Oct 29 15:14:10.906179 2017] [wsgi:info] [pid 16705] mod_wsgi (pid=16705): Initializing Python.
[Sun Oct 29 15:14:10.907856 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16707 (gen 0/slot 2) started
[Sun Oct 29 15:14:10.907795 2017] [wsgi:info] [pid 16706] mod_wsgi (pid=16706): Initializing Python.
[Sun Oct 29 15:14:10.909754 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16708 (gen 0/slot 3) started
[Sun Oct 29 15:14:10.910568 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Initializing Python.
[Sun Oct 29 15:14:10.911443 2017] [core:trace4] [pid 16702] mpm_common.c(534): mpm child 16709 (gen 0/slot 4) started
[Sun Oct 29 15:14:10.911602 2017] [mpm_prefork:notice] [pid 16702] AH00163: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Oct 29 15:14:10.911672 2017] [mpm_prefork:info] [pid 16702] AH00164: Server built: Sep 20 2017 04:52:59
[Sun Oct 29 15:14:10.911767 2017] [core:notice] [pid 16702] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 29 15:14:10.912079 2017] [mpm_prefork:debug] [pid 16702] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Oct 29 15:14:10.913539 2017] [wsgi:info] [pid 16709] mod_wsgi (pid=16709): Initializing Python.
[Sun Oct 29 15:14:10.914593 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Initializing Python.
[Sun Oct 29 15:14:10.989894 2017] [wsgi:info] [pid 16707] mod_wsgi (pid=16707): Attach interpreter ''.
[Sun Oct 29 15:14:10.992852 2017] [wsgi:info] [pid 16708] mod_wsgi (pid=16708): Attach interpreter ''.










share|improve this question













share|improve this question




share|improve this question








edited Oct 29 '17 at 15:19

























asked Oct 28 '17 at 13:24









Sergey Meerovich

263




263











  • Are there any clues in your error log file... sudo cat /var/log/apache2/error.log
    – RubberStamp
    Oct 28 '17 at 14:29










  • As @RubberStamp has implied, we need more and detailed information to help. How do you know apache is restarting every minute -- what log entries indicate this? Do they include any error messages? Maybe consider reading this: unix.stackexchange.com/help/how-to-ask
    – 0xSheepdog
    Oct 28 '17 at 15:24










  • the pid location changes between versions. Are you pointing to the wrong apache.pid location in monit?
    – Rui F Ribeiro
    Oct 28 '17 at 21:48










  • Are you using python? If not, try disabling the wsgi module and see if the problem goes away... a2dismod wsgi ... You may also want to try switching to the itk module instead: Apache 2 ITK MPM it's available on Debian 8 ... and the mpm_prefork module seems to have been removed from Debian 9, in favor of itk
    – RubberStamp
    Oct 30 '17 at 0:55











  • I using python , or more correct I use flask
    – Sergey Meerovich
    Oct 30 '17 at 10:44
















  • Are there any clues in your error log file... sudo cat /var/log/apache2/error.log
    – RubberStamp
    Oct 28 '17 at 14:29










  • As @RubberStamp has implied, we need more and detailed information to help. How do you know apache is restarting every minute -- what log entries indicate this? Do they include any error messages? Maybe consider reading this: unix.stackexchange.com/help/how-to-ask
    – 0xSheepdog
    Oct 28 '17 at 15:24










  • the pid location changes between versions. Are you pointing to the wrong apache.pid location in monit?
    – Rui F Ribeiro
    Oct 28 '17 at 21:48










  • Are you using python? If not, try disabling the wsgi module and see if the problem goes away... a2dismod wsgi ... You may also want to try switching to the itk module instead: Apache 2 ITK MPM it's available on Debian 8 ... and the mpm_prefork module seems to have been removed from Debian 9, in favor of itk
    – RubberStamp
    Oct 30 '17 at 0:55











  • I using python , or more correct I use flask
    – Sergey Meerovich
    Oct 30 '17 at 10:44















Are there any clues in your error log file... sudo cat /var/log/apache2/error.log
– RubberStamp
Oct 28 '17 at 14:29




Are there any clues in your error log file... sudo cat /var/log/apache2/error.log
– RubberStamp
Oct 28 '17 at 14:29












As @RubberStamp has implied, we need more and detailed information to help. How do you know apache is restarting every minute -- what log entries indicate this? Do they include any error messages? Maybe consider reading this: unix.stackexchange.com/help/how-to-ask
– 0xSheepdog
Oct 28 '17 at 15:24




As @RubberStamp has implied, we need more and detailed information to help. How do you know apache is restarting every minute -- what log entries indicate this? Do they include any error messages? Maybe consider reading this: unix.stackexchange.com/help/how-to-ask
– 0xSheepdog
Oct 28 '17 at 15:24












the pid location changes between versions. Are you pointing to the wrong apache.pid location in monit?
– Rui F Ribeiro
Oct 28 '17 at 21:48




the pid location changes between versions. Are you pointing to the wrong apache.pid location in monit?
– Rui F Ribeiro
Oct 28 '17 at 21:48












Are you using python? If not, try disabling the wsgi module and see if the problem goes away... a2dismod wsgi ... You may also want to try switching to the itk module instead: Apache 2 ITK MPM it's available on Debian 8 ... and the mpm_prefork module seems to have been removed from Debian 9, in favor of itk
– RubberStamp
Oct 30 '17 at 0:55





Are you using python? If not, try disabling the wsgi module and see if the problem goes away... a2dismod wsgi ... You may also want to try switching to the itk module instead: Apache 2 ITK MPM it's available on Debian 8 ... and the mpm_prefork module seems to have been removed from Debian 9, in favor of itk
– RubberStamp
Oct 30 '17 at 0:55













I using python , or more correct I use flask
– Sergey Meerovich
Oct 30 '17 at 10:44




I using python , or more correct I use flask
– Sergey Meerovich
Oct 30 '17 at 10:44















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401061%2fapache2-restarts-every-minute%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401061%2fapache2-restarts-every-minute%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?