May 232016

this is how to set maximum number of open file and maximum number of processess on systemd startup script. for example you want give nginx process nofile 20000 and nproc unlimited.

edit nginx.service file

#vi /etc/systemd/system/

add these into [Service] section


reload the systemd script daemon

#systemctl daemon-reload

finally, restart nginx service, and you’re done.

#systemctl restart nginx.service