Welcome! Log In Create A New Profile

Advanced

Re: worker_connections are not enough, reusing connections with idle workers

Sergey A. Osokin
June 07, 2022 05:32PM
On Tue, Jun 07, 2022 at 01:18:36PM -0700, Roger Fischer wrote:
>
> We are simulating 1000 clients. Some get cache hits, and some go upstream. So there are more than 1000 connections.
>
> We have 24 workers running, each configured: events { worker_connections 1024; }
>
> We are seeing the following errors from nginx:
> [warn] 21151#21151: 1024 worker_connections are not enough, reusing connections
> [crit] 21151#21151: accept4() failed (24: Too many open files)
> [alert] 21151#21151: *15716 socket() failed (24: Too many open files) while connecting to upstream,
>
> I am assuming the second and third error are for the OS limit. But the first seems to be from a worker process.

That looks like OS or user account limits, so could you share an
output of the followoing commands:

% uname -a
% cat /etc/*release
% ulimit -Hn
% ulimit -Sn
% cat /proc/sys/fs/file-max

Also, it's possible to increase nginx limits with the worker_rlimit_nofile
directive, http://nginx.org/ru/docs/ngx_core_module.html#worker_rlimit_nofile

Thank you.

--
Sergey A. Osokin
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

worker_connections are not enough, reusing connections with idle workers

roger_bc June 03, 2022 08:40PM

Re: worker_connections are not enough, reusing connections with idle workers

Sergey A. Osokin June 03, 2022 11:42PM

Re: worker_connections are not enough, reusing connections with idle workers

roger_bc June 07, 2022 04:20PM

Re: worker_connections are not enough, reusing connections with idle workers

Sergey A. Osokin June 07, 2022 05:32PM

Re: worker_connections are not enough, reusing connections with idle workers

roger_bc June 07, 2022 05:44PM

Re: worker_connections are not enough, reusing connections with idle workers

Sergey A. Osokin June 07, 2022 09:26PM

Re: worker_connections are not enough, reusing connections with idle workers

Maxim Dounin June 07, 2022 07:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready