Graceful restart fails after move to new IP

nemonoman

Verified User
Joined
Apr 7, 2007
Messages
26
Hi:
I am using Digital Ocean to create "droplets" -- cloud virtual machines.

They provide a replication service: Take a snapshot of the whole server droplet, then spin up a new droplet based on the snapshot.

After spinning up a droplet this way, the only difference between the two servers is the server IP address.

I buy a new DA license for the new server, install it manually, and use the 'change IP script' to change DA's config of the server IP.

The DA.conf files are identical.
I have added
graceful_restarts=1
to the original, and it has been copied exactly.

The purpose of these servers is to create subdomains on demand.

When I first did this, I would set a timer, waiting for the dataskq to restart httpd at the top of the minute.

Once I added graceful_restarts=1 on the original machine, no timer was needed -- new subdomains were available instantly.

ON THE COPY SERVER, this graceful restart and instant subdomain availability fails.

I just created a new subdomain. The httpd error_log shows:

[Fri Mar 02 15:53:02.106767 2018] [mpm_prefork:notice] [pid 2009] AH00171: Graceful restart requested, doing restart

On Server 1, this subdomain would be available
On server 2, the new subdomain was not available until 15:54 -- after the dataskq ran, I'm guessing.

I want to assure that a graceful restart happens. Either I need to figure out what is differently configured, or figure out how to hardwire a graceful restart in my custom subdomain_create_post.sh script

I can show you online examples of working and failure, if that helps.

Any ideas? I'm fresh out.
Thanks, guys.

NOTE: FYI, on new server, the subdomains get created as advertised--they're just not available until top of the minute after dataskq runs.
 
Last edited:
Hello,

That's a normal situation that a new virtual host is only available after a web-server learn about it, so it should be restarted or reloaded, so that it could read newly updated configs.

And if you don't use custom script for a instance reload/restart then you need to wait until it will be restarted/reloaded with a cron, which runs once per 1 minute.

Other option is to use wild-card.... I don't know how much suitable it is for your setup.
 
I solved this problem by manually rewriting the /usr/local/directadmin/data/users/USERNAME httpd.conf files myself as part of a custom subdomain_create_post.sh script, then sending a graceful restart to apache.

The subdomain becomes available instantly. Eventually dataskq runs, and rewrites the conf files after me, but they're no different than the manual version.

If anyone is interested in the method, I'm happy to share. It's a pain in the ass to get right the first time.

Nemo
 
Back
Top