Nginx start failed, Too many open files

Hello everyone!
Please help.
I am using Ubuntu 18.04.6 LTS and HestiaCP v1.5.4.
I created about 1000 subdomains using the API (v-add-domain), each of them is directed to the main domain (v-change-web-domain-docroot), after which nginx crashed, I tried to google the answer, found out about the existence of the command nginx -t, got “nginx: [emerg] open() “/var/log/apache2/domains/subdomain.domain.com.bytes” failed (24: Too many open files)”
Tried to edit “/etc/nginx/nginx.conf”:
wosker_rlimit_nofile 300000;
This did not help, please tell me what to do.

Use aliases (Max 100 per domain)

I solved the problem:
systemctl edit --full nginx.service

In section [Service] add line:
LimitNOFILE=300000

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.