[asterisk-users] 786 000 files limit Centos 7 - Asterisk keep complaining

Stefan Viljoen viljoens at verishare.co.za
Wed Aug 12 02:06:56 CDT 2015


Hi Steve

Just running about 50 calls??

If I do

lsof | grep asterisk | wc -l

to narrow the realm of what is reported I still get just under 100 000
files:

lsof | grep asterisk | wc -l
95903

with 50 calls running.

So apparently this is excessive? I can only guess that there must be a MAJOR
bug in 1.8.11.0 given that you are running 347 calls on 2161 open files with
Ast 11...?

I'm on Centos 7.

As I mentioned previously, I have found that my problem with Asterisk
running out of files is that the Asterisk binary, on startup, does NOT
"detect" that the open file limit it 768 000, it always selects 1024 as the
soft limit for open files and 4096 as the hard limit for open files. I have
to manually (cron does not work - wonder why?) do

/usr/bin/prlimit --pid `pidof asterisk` --nofile=786000:786000

in order to get the running Asterisk instance to ACTUALLY have a soft and
hard number of files limit of 786 000.

The machine under discussion never runs more than about 60 calls, at which
point it consumes about 125 000 file descriptors / handles in Asterisk
(total open files in the kernel goes to about 195 000) - I thought this was
normal....!

Note that besides some timer problems that pop up occassionally (unsure if
it is related) the box is totally stable and has spent days at 100 000+ open
file descriptors operating Asterisk 1.8.11.0 quite happily with no other
problems save that when the binary started up for that run it did not have a
sufficiently high file limit to actually work.

Thanks for the reply!

Kind regards,

> I suspected something like that, though repeatedly running
>
> lsof | wc -l
>
> Always stays quite low - 100 000 open files, which is still 8 times 
> less than the system maximum as confirmed by running ulimit -n

What the 'h' are you doing that takes x00,000 open files?

I'm running Asterisk 11.17.0 on CentOS 6.7 and my 'numbers' seem
insignificant by comparison.

sudo /usr/sbin/asterisk -r -x 'core show channels' | grep active
347 active channels
344 active calls

sudo lsof | wc -l
3945

sudo lsof | grep asterisk | wc -l
2161

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST



------------------------------

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

End of asterisk-users Digest, Vol 133, Issue 14
***********************************************




More information about the asterisk-users mailing list