Increase max open files for Ubuntu/Upstart (initctl)

前端 未结 1 363
长发绾君心
长发绾君心 2021-02-02 17:48

This is on an Ubuntu 12.04.3 LTS server.

I\'ve added the following to /etc/security/limits.conf (my Golang processes run as root):

*      hard   nofile           


        
相关标签:
1条回答
  • 2021-02-02 18:09

    This needs to be added to your Upstart script for it to work:

    limit nofile 50000 50000
    

    "It's by design that upstart does not look at /etc/security/limits.conf for system jobs. PAM settings are only applied to user sessions, not to system services." from https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/938669

    Sources:

    https://github.com/saltstack/salt/issues/5323

    http://bryanmarty.com/blog/2012/02/10/setting-nofile-limit-upstart/

    0 讨论(0)
提交回复
热议问题