Apache reload vs restart

nicknn

Verified User
Joined
Oct 4, 2006
Messages
34
Hi

I noticed that when you put a new site on a server, suspend a user,cron jobs etc, directadmin uses the restart command to restart the httpd.

In servers with more than 600-700 sites, sometimes it can take up to 1-2 minutes to complete, and during this time the httpd server is down.

Is the reload command not OK to use in this situations?
If httpd is reload, it read all the user httpd config files right?.

So why not modify the directadmin binary just reload every time a new site is added?

Thanks
 
waiting for official DA answer.
I can edit /etc/init.d/httpd to change restart function, but will this work?
 
Sure it will. This has been already discussed here.
Sorry, no links. Please, use search function of the board, if you need confirmation.
 
If you change the httpd startup script then you'll never be able to restart apache from the command line. But there's an interesting thread worth reading at linuxquestions.org.
Jeff
 
Hello,

This is our official solution for this question:
http://www.directadmin.com/features.php?id=980

A reload is not sufficient as it does not reload the SSL certificates if there are changes there. Any new VirtualHosts, new domain, new subdoman, etc.. (even if they use the same certs) require a new read of the certs, and reload doesn't do this.

A restart is required... however, the graceful restart, mentioned above, can do a full restart without interruption of current connections.

We hope to set graceful_restart=1 in the directadmin.conf as the new default for a future release of DA (for new installs).

John
 
Any call to add action=httpd&value=restart to the task.queue file will have it replaced with action=httpd&value=graceful.

I have added graceful_restarts=1 and now I see
action=httpd&value=reload instead of action=httpd&value=graceful

What does DA do now ? /etc/init.d/httpd reload or /etc/init.d/httpd graceful
 
Hello,

Sometimes a realod is used, other times a restart is used (depends what was done)
If both exist in the task.queue, then the dataskq will use the most significant (restart). If a restart used, and graceful_restarts=1, then DA will call:
/etc/init.d/httpd graceful

A reload will re-read apache configs for some changes, and will also re-open log files (eg: for log rotation/tally).

The /var/log/system.log should tell you what happened.

Also, I checked the code, and the graceful is added to the task.queue. The dataskq doesn't translate the "restart" to a "graceful".. the directadmin binary does the translation before it's added to the task.queue. So whatever you see in the task.queue is what is going to happen.

John
 
Back
Top