azure - How to change *default* open-file limit on Ubuntu 12.4 -


we have ubuntu 12.04 lts servers, both local , hosted in azure. while can change file limits interactively logged in users, seems default, services started init.d hard open-file limit of 4096. while can use upstart , set higher limits specific services, doesn't for, say, hortonworks hdp, runs sorts of services using own mechanisms. want change system-wide default open-file limit everything. how that?

1. check system wide settings: /etc/security/limits.conf

a no limitations config file:

*               soft    nofile  102400 *               hard    nofile  102400 *               soft    nproc   102400 *               hard    nproc   102400 root            hard    nofile  102400 root            soft    nofile  102400 

2. check program auto startup script , settings

program auto startup script bit different, has own settings, or use the default 1024.

example: program supervisor(test on ubuntu 12/14)

/etc/init.d/supervisor - auto startup script /etc/init/supervisor.conf - auto startup script settings 

you can add ulimit command in /etc/init.d/supervisor set limits, or add limits settings in /etc/init/supervisor.conf. /etc/init/supervisor.conf example:

limit nofile 102400 102400 

3. check program specific settings

some program has own limits. supervisor, has own file/process limits, must add minfds , minprocs settings on config files /etc/supervisor/supervisord.conf. other program use system or auto startup settings.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -