Difference between revisions of "Too many open files"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with 'If you see this error in Asterisk CLI and it makes Asterisk to crash, solution is following: Add lines: * hard nofile 65536 * soft nofile 65536…')
 
 
Line 1: Line 1:
If you see this error in Asterisk CLI and it makes Asterisk to crash, solution is following:
If you see this error in Asterisk CLI or logs and it makes Asterisk to crash, solution is following.


Add lines:
Replace the line in /usr/sbin/safe_asterisk :
*        hard    nofile      65536
*        soft    nofile      65536
root      hard    nofile      65536
root      soft    nofile      65536


to /etc/security/limits.conf
...
ulimit -n $MAXFILES
...


Those changes would be applied after reboot.
with line


To avoid reboot we can apply values by using command:
...
ulimit -n 131072
...


ulimit -n 65536
and restart Asterisk.

Latest revision as of 12:26, 18 September 2013

If you see this error in Asterisk CLI or logs and it makes Asterisk to crash, solution is following.

Replace the line in /usr/sbin/safe_asterisk :

...
ulimit -n $MAXFILES
...

with line

...
ulimit -n 131072
...

and restart Asterisk.