apache seems to freeze on centos7 systemctl

3 posts / 0 new
Last post
#1 Mon, 06/27/2016 - 10:12
edwardsmarkf

apache seems to freeze on centos7 systemctl

hello - ever since i went to centos7 and started using systemctl, i have started to occasionally have situations where apache seems to just stop.

and this morning, when i tried to issue:

systemctl stop httpd.service systemctl start httpd.service

apache would not start.

'systemctl status httpd.service' gave the the message below.

suggestions?

# systemctl status httpd.service;
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2016-06-27 10:44:07 EDT; 13s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 8152 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 10572 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 8151 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 8151 (code=exited, status=1/FAILURE)

Jun 27 10:44:06 myserver.info systemd[1]: Starting The Apache HTTP Server...
Jun 27 10:44:07 myserver.info systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 27 10:44:07 myserver.info kill[8152]: kill: cannot find process ""
Jun 27 10:44:07 myserver.info systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 27 10:44:07 myserver.info systemd[1]: Failed to start The Apache HTTP Server.
Jun 27 10:44:07 myserver.info systemd[1]: Unit httpd.service entered failed state.
Jun 27 10:44:07 myserver.info systemd[1]: httpd.service failed.
Mon, 06/27/2016 - 10:28
andreychek

Howdy,

Hmm, that's an odd one!

Are you seeing any other errors in the Apache error log in /var/log/httpd/error_log?

For example, this here shows something similar to what you're experiencing:

https://www.centos.org/forums/viewtopic.php?t=53418

In the case above, we see the same error you're getting, but there's also some additional context that better explains what's going on.

Similar with this issue here:

https://www.centos.org/forums/viewtopic.php?t=53418

In both of those cases, it's that extra context that helps determine what's going on there. Let us know what additional errors you're seeing in the logs, if any, around the time of Apache being restarted.

-Eric

Mon, 06/27/2016 - 14:32
edwardsmarkf

thank you for the suggestion - i did see this:

[Mon Jun 27 03:22:07.536459 2016] [:emerg] [pid 12920] mod_qos(007): could not determine MaxClients/MaxRequestWorkers! You MUST set this directive within the Apache configuration file.

so i installed mod_qos, but then got the following message: [Mon Jun 27 14:00:43.125920 2016] [:notice] [pid 1957] mod_qos(009): server version is 2.4 but mod_qos should be used with Apache 2.2 only.

although i did read here:

https://sourceforge.net/projects/mod-qos/

Pascal Buchbinder posted a comment on ticket #33
mod_qos should work with Apache 2.4.12 or newer and all features have been enabled...
3 weeks ago

i also loaded RequestReadTimeout after reading this:

http://linuxtoolkit.blogspot.com/2014/04/using-modreqtimeout-to-make-htt...

1) add this line to httpd.conf: LoadModule reqtimeout_module modules/mod_reqtimeout.so

2) vi /etc/httpd/conf.d/mod_qos.conf ;

<ifmodule reqtimeout_module>
RequestReadTimeout header=10-20,minrate=500
RequestReadTimeout body=10,minrate=500
</ifmodule>
Topic locked