Restarting service takes too much time

Maxim Dounin mdounin at mdounin.ru
Thu Dec 1 18:03:24 UTC 2022


Hello!

On Thu, Dec 01, 2022 at 12:40:08AM -0300, Gus Flowers Starkiller wrote:

> Hi, please could anyone tell me why the nginx service takes too much time
> to restart? As we know, after some change with nginx the service must be
> restarted, I do this with "nginx -s reload" or "systemctl restart nginx",
> and this takes some three minutes or more. This process is happening in
> servers with many websites (eg 200 sites). So, with a new nginx this
> restart of nginx is immediate but with many sites this restart process of
> nginx is very slow, I am using Debian with nginx and OWASP.

The most obvious thing I would recommend to check is if the system 
resolver is functioning properly.  If nginx configuration uses 
domain names rather than IP addresses, and there are issues with 
system resolver (for example, one of the configured DNS servers do 
not respond), loading the configuration might take a lot of time.

-- 
Maxim Dounin
http://mdounin.ru/



More information about the nginx mailing list