Nginx does not start

Started by soloweb_ademilton, April 30, 2020, 01:26:47 PM

Previous topic - Next topic

soloweb_ademilton

Hi guys,

I'm having a problem putting Apache + nginx + varnish to work, nginx does not start showing the following error:

emerg] 49623 # 49623: open () "/usr/local/apache/domlogs/domainserver.error.log" failed (24: Too many open files)

Does anyone have an idea of what it might be? Or have you faced a similar problem?

Sandeep

increase the open file limit for the service or the server.

soloweb_ademilton

Quote from: Sandeep on April 30, 2020, 05:44:23 PM
increase the open file limit for the service or the server.

thanks Sandeep

and how would it be ?, I've tried to do this following some tips from other forums and sites but still have the same problem.

soloweb_ademilton

Hi guys,

I managed to solve.

Just follow these steps:


Create file /etc/systemd/system/nginx.service.d/override.conf with the following contents:
insert
[Service]
LimitNOFILE=65536

Reload systemd daemon with:
systemctl daemon-reload

Add this to Nginx config file:
worker_rlimit_nofile 16384; (has to be smaller or equal to LimitNOFILE set above)

And finally restart Nginx:
systemctl restart nginx