Когда Ваша система упирается в лимиты чтения файлов, возникает такая ошибка:

2021/05/06 11:07:54 [crit] 30490#30490: *678056 open() "/var/data-www/site.org/img/78873/_0.webp" failed (24: Too many open files), client: 171.33.252.0, server: site.org, request: "GET /img/78873/_0.webp HTTP/2.0", host: "site.org", referrer: "https://site.org/url"

Попробуйте:

https://serveradmin.ru/nginx-too-many-open-files/

worker_processes  auto;
events {
    worker_connections  5120;
}
worker_rlimit_nofile 40960;
nginx -s reload
nano /etc/sysctl.conf
fs.file-max = 64000

Edit /etc/security/limits.conf and add:

nginx soft nofile 64000
nginx hard nofile 64000

echo 'NGINX_ULIMIT="-n 64000"' >> /etc/sysconfig/nginx

Edit /usr/lib/systemd/system/nginx.service and add a line in the [Service] section:

LimitNOFILE=64000

In /etc/sysconfig/nginx.systemd add:

LimitNOFILE=64000

Reload system daemon:

systemctl --system daemon-reload
sysctl -p

Restart nginx:

/etc/init.d/nginx restart
for pid in `pidof nginx`; do echo "$(< /proc/$pid/cmdline)"; egrep 'files|Limit' /proc/$pid/limits; echo "Currently open files: $(ls -1 /proc/$pid/fd | wc -l)"; echo; done

Возможно, также стоит задуматься над такими настройками nginx.conf:

 tcp_nodelay on;
tcp_nopush on;
client_max_body_size 9g;
client_header_timeout 40;
client_body_buffer_size 256k;
large_client_header_buffers 16 128k;
limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m;
limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=200r/s;
limit_conn conn_limit_per_ip 1500;
limit_req zone=req_limit_per_ip burst=100;