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/multi-user.target.wants/nginx.service

add these into [Service] section

LimitNOFILE=20000
LimitNPROC=infinity

reload the systemd script daemon

#systemctl daemon-reload

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

#systemctl restart nginx.service

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*