2013-11-15 28 views
13

Questo è su un server LTS di Ubuntu 12.04.3.Aumenta max file aperti per Ubuntu/Upstart (initctl)

ho aggiunto quanto segue al /etc/security/limits.conf (il mio Golang processi vengono eseguiti come root):

*  hard nofile 50000 
*  soft nofile 50000 
root hard nofile 50000 
root soft nofile 50000 

ho aggiunto quanto segue per /etc/pam.d/common -session

session required pam_limits.so 

ho aggiunto quanto segue al file /etc/sysctl.conf:

fs.file-max = 50000 

Eppure, quando ho cat/proc/PID {} ​​/ limiti, ottengo :

Limit      Soft Limit   Hard Limit   Units  
Max open files   1024     4096     files  

Ciò accade solo quando si avvia il processo di Upstart tramite sudo initctl iniziare service_name. Se avvio da solo il processo, riconosce le mie impostazioni.

Come posso risolvere questo problema?

risposta