Scaling with Nginx (Error: worker_connections are not enough)

Solution: By bumping up worker connections in Nginx config file

Worker_connections are not enough

2018/08/19 08:37:09 [alert] 14517#14517: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14517#14517: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14517#14517: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14518#14518: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14518#14518: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14517#14517: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14517#14517: 3000 worker_connections are not enough
2018/08/19 08:37:09 [alert] 14517#14517: 3000 worker_connections are not enough
worker_connections are not enough

This usually happens when Nginx is creating more connections than allowed in the configuration files. Which is quite simple just increase the number of connections allowed for the workers. Keep in mind these settings depends on your hardware size and the number of users you are serving. In our case we used to do fine with a value below 1000 but with the recent increase in traffic we had to bump this number up.

/etc/nginx/nginx.conf
Nginx Config file needs to be edited
events {
        #Large number based on your situation
        worker_connections 20000; 
}
Increase worker connection

Other variations of Worker_connections are not enough error


2018/08/19 08:46:32 [alert] 14517#14517: *1128344 3000 worker_connections are not enough while connecting to upstream, client: 2607:fb90:8a5:19fe:ddc1:7265:5d72:646e, server: craftypixels.com, request: "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1", upstream: "/socket.io/?EIO=3&transport=websocket", host: ""
2018/08/19 08:46:32 [alert] 14518#14518: *1128352 3000 worker_connections are not enough while connecting to upstream, client: 70.54.115.201, server: craftypixels.com, request: "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1", upstream: "/socket.io/?EIO=3&transport=websocket", host: "craftypixels.com"
2018/08/19 08:46:32 [alert] 14517#14517: *1128355 3000 worker_connections are not enough while connecting to upstream, client: 24.162.99.225, server: craftypixels.com, request: "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1", upstream: "/socket.io/?EIO=3&transport=websocket", host: "craftypixels.com"
2018/08/19 08:46:32 [alert] 14517#14517: *1128368 3000 worker_connections are not enough while connecting to upstream, client: 81.157.70.235, server: craftypixels.com, request: "GET /socket.io/?EIO=3&transport=websocket HTTP/1.1", upstream: "/socket.io/?EIO=3&transport=websocket", host: "craftypixels.com"
2018-08-20T06:59:30+00:00

Leave A Comment