Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My Apache (Version 2.4.25 on Debian 9.11) works fine, but I need to change and reload the configuration regularly without breaking active connections, so I run /etc/init.d/apache2 reload, which, in most cases (approx 9/10), fails after 90 seconds.
The output I get is
Quote:
root@prod-serv:~# /etc/init.d/apache2 reload
[....] Reloading apache2 configuration (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
failed!
systemctl status apache2.service gives me the following output:
Quote:
Mar 26 07:44:03 prod-serv systemd[1]: Reloading The Apache HTTP Server.
Mar 26 07:45:33 prod-serv systemd[1]: apache2.service: Reload operation timed out. Killing reload process.
Mar 26 07:45:33 prod-serv systemd[1]: Reload failed for The Apache HTTP Server.
And journalctl -xe:
Quote:
Mar 26 09:21:16 prod-serv systemd[1]: Reload failed for The Apache HTTP Server.
-- Subject: Unit apache2.service has finished reloading its configuration
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit apache2.service has finished reloading its configuration
--
-- The result is failed.
I have not found any useful information in /var/log/apache2/error.log (and all other Apache logs).
Does anyone here know if there are any other files that can help me identify the problem more accurately?
My guess is that my config is too big (1200 sites-enabled) and the reload fails to go through them all in 90 seconds and thus fails? If so, can I increase the timeout value?
root@prod-serv:~# /etc/init.d/apache2 reload
[....] Reloading apache2 configuration (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
failed!
<-snip->
Does anyone have an idea where I can find more information about this (more log-files etc.)?
I guess you need to follow the advice from systemctl and run either "journalctl -xe" or "systemctl status apache2.service" to find more info.
Quote:
My Apache works fine, but I need to change and reload the configuration regularly without breaking active connections, so I run /etc/init.d/apache2 reload,
If you want to keep active connections, you need to do a graceful restart
I'm not using debian, but I think you can use:
I guess you need to follow the advice from systemctl and run either "journalctl -xe" or "systemctl status apache2.service" to find more info
Well, I did that, and you can find the output in my question?
Quote:
If you want to keep active connections, you need to do a graceful restart
I'm not using debian, but I think you can use:
Code:
apache2ctl graceful
As far as I know, /etc/init.d/apache2 reload does more or less the same, at least no active connection was cut off (e.g. downloads) when I executed the command.
My guess is that my config is too big (1200 sites-enabled) and the reload fails to go through them all in 90 seconds and thus fails? If so, can I increase the timeout value?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.