LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-26-2020, 04:03 AM   #1
dr-ing
LQ Newbie
 
Registered: Mar 2020
Posts: 19

Rep: Reputation: Disabled
apache2.service: Reload operation timed out. Killing reload process.


Good day,

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?

Thanks in advance
dr-ing.

Last edited by dr-ing; 03-26-2020 at 09:19 AM.
 
Old 03-26-2020, 09:23 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
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!
<-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:
Code:
apache2ctl graceful
Regards
 
Old 03-26-2020, 09:37 AM   #3
dr-ing
LQ Newbie
 
Registered: Mar 2020
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hello bathory,

Quote:
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.

Regards
dr-ing.
 
Old 03-26-2020, 10:56 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
Well, I did that, and you can find the output in my question?
You've changed part of your OP, so I didn't saw it.

Anyway you can try to start apache in debug mode and see what you get:
Code:
/usr/sbin/httpd -e debug -k graceful
 
Old 03-27-2020, 05:16 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by dr-ing View Post
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?
Holy cow.
Good luck troubleshooting that.
If you really think it's "just" a systemd timeout issue.
 
Old 03-27-2020, 07:59 AM   #6
dr-ing
LQ Newbie
 
Registered: Mar 2020
Posts: 19

Original Poster
Rep: Reputation: Disabled
So I increased the systemd service timeout value and the first tests were successful.
Looks like this solved it.

Last edited by dr-ing; 03-27-2020 at 08:01 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error log: upstream timed out (110: Connection timed out) on Nginx nikaway Linux - Server 1 09-30-2015 02:43 PM
[SOLVED] USB: Connection timed out SYS: Connection timed out PeterUK Programming 3 07-18-2013 02:59 AM
sendmail - Connection timed out [dsn=4.0.0 stat=Deferred: Connection timed out] ananthak Linux - Software 0 04-24-2007 07:28 AM
Jboss error message, operation timed out sanw2k Linux - Networking 1 06-09-2003 07:52 AM
the operation timed out when attempting to contact myserver:8080 sanw2k Linux - Networking 1 06-09-2003 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration