Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have 4 webservers behind nginx being hit with 262 events/second. I would like to tell nginx to stop sending requests to that server. If I remove the server from the file and reload the file, aren't all requests in process dropped on the floor then as nginx no longer knows that server. What can I add to the config so it slowly drops that server out of the pool and I can wait for current requests to complete.

share|improve this question
up vote 3 down vote accepted

According to the nginx documentation, updating the config and then using the service nginx reload or /etc/init.d/nginx reload commands should start new worker processes with the new configuration and close any listen sockets on the old worker processes, preventing new connections to them. These old worker processes will continue running until they have finished serving their clients and then shut down.

share|improve this answer

Mark server as down in nginx config. You might also check max_fails and fail_timeout parameters. Reload the config by sending HUP signal to the master node.

See nginx manual

Please note that you should use QUIT signal to gracefully shutdown the server node.

share|improve this answer
manual says for down the following "marks server as permanently offline, to be used with the directive ip_hash." I am not using ip_hash directive though :(. – Dean Hiller Nov 5 '12 at 22:22
Set max_fails to 1 and reload config (sig HUP). Gracefully shutdown the server node by sending QUIT signal. – FINESEC Nov 5 '12 at 22:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.