[Asterisk-Dev] Problem with too many files open

Federico Alves sales at minixel.com
Mon Jan 31 05:52:02 MST 2005


Thanks for your input on the "too many files" problem. Please see below my
ulimit -a output. 

core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 10000
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 2880
virtual memory        (kbytes, -v) unlimited

I a using OH323, because I could not make the "regular" H323 stack work with
G729. Better said, Digium tech support could not make it work in spite of me
paying almost $1500 in support fees, which I wasted 100%. I had to hire
Ehsan out of Blangadesh and he installed Oh323 and G729. Let me make my case
for this decision. The corporate pre-paid softswitching business has only
one Inbound protocol (SIP) and one single outbund protocol (H323), and
therefore the codec has to be one, G729, because is supported by cheap
SIP-DID providers like Vonage and by all the H323 carriers. It is a mystery
to me why Digium sells G729 licenses and fails to make it work with the
current H323 stack. Coming back to the problem, I did some tests using the
following bash script, 
#!/bin/bash
PIDS=`echo /proc/[0-9]* | sed 's/\/proc\///g' | sed 's/ /\n/g' | sort -n`
for i in $PIDS
        do if [ -d "/proc/$i/" ]
        then    echo -n "$i: "
                ls /proc/$i/fd/ | wc -w 2>/dev/null
        fi
done

and the amount open files advances 24 units per each simultaneous call, and
never retreats. I would appreciate any input. Maybe my Asterisk "forked".
How do I know when Asterisk is "forked"? I see always many processes
belonging to Asterisk. How many processes are "normal"?
Federico




More information about the asterisk-dev mailing list