RTP Connections Failing Due To Bad File Descriptors

Home » Asterisk Users » RTP Connections Failing Due To Bad File Descriptors
Asterisk Users 1 Comment

I keep getting messages in the Asterisk CLI that there are not enough file descriptors available on my CentOS 7 box.

I also get regular error messages that RTP connections are failing due to bad file descriptors.

I have already edited /etc/sysctl.conf by setting fs.file-max to 786 000
files, and running sysctl -p afterward.

I have also edited /etc/security/limits.conf and entered

* soft nofile 786000
* hard nofile 786000

and rebooted my system.

When I ge the Asterisk error messages in the CLI that there are not enough file descriptors, I immediately ran

lsof | wc -l

and I only get around 100 000 files open – while my limit is 786 000 – yet still Asterisk keeps complaining.

I have also edited /etc/asterisk/asterisk.conf to have

maxfiles = 786000

and restarted Asterisk / rebooted, but this has no effect.

Why does Asterisk complain that there are insufficient file descriptors when my limit is 786 000 and the kernel itself states that only
100 000+ handles / decriptors are in use at the moment Asterisk is complaining about insuffiecient descriptors?

Anybody else ran into this?



—–Original Message—

One thought on - RTP Connections Failing Due To Bad File Descriptors

  • In article <001c01d0d10a$ce89cd40$6b9d67c0$@verishare.co.za>, Stefan Viljoen wrote:

    No, but I would ask myself why so many file descriptors are being used. It sounds like you have a file descriptor leak (not being closed when finished with).

    You might also want to look at the output of lsof (or at least some of it)
    to see what all these file descriptors are pointing to, and whether it is indeed Asterisk that is consuming them.

    If it is Asterisk, it’s quite possible, even probable, that such a leak has been found and fixed, even in the 1.8 series. is rather old –
    the latest is, so it would be best to update to that version and see if the problem persists.

    Cheers Tony