From terminal in ubuntu, change ulimit for file descriptor number

感情迁移 提交于 2019-12-01 09:19:35

I had a similar issue when trying to raise the number of file descriptors for Nginx. I had to change nofile in /etc/security/limits.conf for the www-data user:

www-data    hard    nofile    16384
www-data    soft    nofile    16384

After this change ulimit still showed a limit of 1024. The solution was to enable *pam_limits* in /etc/pam.d/su. I just uncommented the line:

session    required    pam_limits.so

Changing this value didn't require a restart, I just logged in as www-data again. Now, running ulimit -a revealed the value 16384.

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!