I found 'multi_accept' is 'off' as default in Nginx as follows:



Probably because with on, all the worker processes are active and try to handle all of the incoming request simultaneously. When disabled, Nginx decides which child process gets to deal with the request one by one. As Nginx is very efficient at this, this probably serves most people well. Some consider it a risk to enable it, as it may flood the worker connections with requests. Your TCP settings at OS level will likely play a part in this too.

  • 3
    I had the exact situation. I had tried to find out what worker_rlimit_nofile, worker_connections and worker_processes auto commands do. Nginx is a reverse proxy for an application which accepts websockets. Nginx config allows 50 connections for every worker. When I have two workers (therefore 100 connections should be established) and multi_accept is on I get an error that the websockets can't be created (the worker who already has 50 connections tries it...). When multi_accept is off everything works perfectly. – Hamburml Jun 22 '17 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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