0

I've been facing an issue with Asterisk 13.11.2 on Debian 8 where it's crashing after reaching the limit of open files

bridge_channel.c: Can't create pipe! Try increasing max file descriptors with ulimit -n

I have managed to increase the limit from 65536 to 150000 using the /etc/security/limits.conf

I have added the following:

root soft nofile 150000
root hard nofile 150000
* soft nofile 150000
* hard nofile 150000

The result of ulimit -n is now 150000

When i try check the limit for the Asterisk process cat /proc/xxx/limits

I still get the old limit!

Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             31945                31945                processes
Max open files            1024                 4096                 files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       31945                31945                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

How to solve this?

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • If you are using systemd, have a look at man systemd.exec or online. In case you are using a SysV script, just add the ulimit -n <your-number-here> to the top of your script. – Thomas Oct 4 '16 at 9:54
  • restart asterisk to make changes of ulimit available (for the new process) – Romeo Ninov Oct 4 '16 at 12:47
  • @RomeoNinov I guess i didn't mention that I did restart the server for the changes to apply. Didn't work – TareKhoury Oct 4 '16 at 12:55
  • @TareKhoury is this 64 bit OS? And do you restart it by hand? – Romeo Ninov Oct 4 '16 at 14:24
0

Uncomment and change the value of MAXFILES in /usr/sbin/safe_asterisk

ex: MAXFILES = 150000

save file and restart asterisk

done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.