RTP RTP socket X.X.X.X:53522 not available - error 7/24: Cannot allocate memory
I think i recive "Cannot allocate memory" because the gnugk,pwlib cannot allocate a new socket (RTP or for signalling) . That happening because of limitation from config file: H245PortRange,Q931PortRange,T120PortRange,RTPPortRange.
In the same time i belive it's a problem with TcpKeepAlive. It have a wrong implementation or
net.ipv4.tcp_keepalive_time=20
net.ipv4.tcp_keepalive_probes=3
net.ipv4.tcp_keepalive_intvl=5
are to high( but 28 second i belive it's ok).
with 75 calls we have 3432 ESTABLISHED tcp socket, that mean average 43 socket per call( it should have 4 socket, too much) and 48 UDP socket average per call for rtp(it should have 6 socket)
h323gk ~ # lsof -n -P | grep gnugk | grep ESTABLISHED | grep 1720 | wc -l
3432
h323gk gnugk # lsof -n -P | grep gnugk | grep UDP | wc -l
3608
I dont understand why gnugk crash. Before it crash i receive a lot of error like ' Cannot allocate memory' and after that gnugk crash with:
2007/10/02 20:59:17.350 0 assert.cxx(108) PWLib Assertion fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
2007/10/02 20:59:17.362 0 assert.cxx(108) PWLib Assertion fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
2007/10/02 20:59:17.366 0 assert.cxx(108) PWLib Assertion fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
2007/10/02 20:59:17.369 0 assert.cxx(108) PWLib Assertion fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
2007/10/02 20:59:17.378 0 assert.cxx (108) PWLib Assertion fail: Invalid parameter, file ../common/sockets.cxx, line 1400, Error=24
2007/10/02 20:59:17.379 0 assert.cxx(108) PWLib Assertion fail: Invalid parameter, file ../common/sockets.cxx, line 1400, Error=4
2007/10/02 20:59:17.400 0 assert.cxx(108) PWLib Assertion fail: Invalid parameter, file ../common/sockets.cxx, line 1400, Error=24
2007/10/02 20:59:17.400 0 assert.cxx(108) PWLib Assertion fail: Invalid parameter, file ../common/sockets.cxx, line 1400, Error=4
2007/10/02 20:59:17.402 0 assert.cxx(108) PWLib Assertion fail: Invalid parameter, file ../common/sockets.cxx, line 1400, Error=9
2007/10/02 20:59:17.402 0 assert.cxx(108) PWLib Assertion fail: Invalid parameter, file ../common/sockets.cxx, line 1400, Error=4
or with
2007/10/02 22:58:08.597 0 assert.cxx(108) PWLib Assertion fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
2007/10/02 23:08:08.602 0 assert.cxx(108) PWLib Assertion fail: Function ::close failed, file tlibthrd.cxx, line 845, Error=`
2007/10/02 23:08:08.602 0 assert.cxx(108) PWLib Assertion fail: Function ::close failed, file tlibthrd.cxx, line 846, Error=`
This was with gnugk 2.2.5 . Now i have compiled gnugk 2.2.6 with large_fdset=102400 ( just in case) and
[Gatekeeper::Main]
Fourtytwo=42
Name=eurovoice
EndpointSignalPort=1720
StatusPort=7000
UseBroadcastListener=1
ListenQueueLength=1024
SignalReadTimeout=1000
StatusReadTimeout=3000
Home=X.X.X.X
[RoutedMode]
GKRouted=1
H245Routed=0
DropCallsByReleaseComplete=1
SendReleaseCompleteOnDRQ=1
ForwardOnFacility=0
EndpointSignalPort=1720
CallSignalPort=1720
RemoveH245AddressOnTunneling=1
CallSignalHandlerNumber=6
RtpHandlerNumber=6
RemoveCallOnDRQ=0
SendReleaseCompleteOnDRQ=1
TranslateFacility=0
ActivateFailover=1
FailoverCauses=1-15,17,21-127
SocketCleanupTimeout=1000
TcpKeepAlive=0
H245PortRange=30000-39999
Q931PortRange=20000-29999
[Proxy]
Enable=1
T120PortRange=40000-49999
RTPPortRange=1024-65000
i know that TcpKeepAlive=0 but the sysctl values are (just in case)
net.ipv4.tcp_keepalive_time=20
net.ipv4.tcp_keepalive_probes=3
net.ipv4.tcp_keepalive_intvl=5
PS: with TcpKeepAlive=0 i reach 250 calls in proxy mode
Dani
On 10/26/07, Dani Popa <
dani.popa@xxxxxxxxx> wrote:
Hi,
h323gk ~ # ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 8183
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 8183
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
I had modified /etc/init.d/gnugk script to modifty "open files" before start-stop-daemon, i'll notice you tomorow about gnugk crash.
now ulimit -n should be 1024000 ( i read somewhere that fd should be max 4096, let's see what is happening).
Dani
--On 10/25/07, Zygmuntowicz Michal <m.zygmuntowicz@xxxxxxx > wrote:Also remember that each PWLib thread consumer 1 or 2 file descriptors.
Anyway, too many threads is also not an option. I don't think you need more
than 64 threads. And you can set RtpHandlerNumber to much lowervalue.
----- Original Message -----
From: "Dani Popa" < dani.popa@xxxxxxxxx>
Sent: Thursday, October 25, 2007 12:42 PM
> HI Jan,
> as i see in gentoo system
>
> h323gk gnugk # ulimit
> unlimited
>
> i can set it to 20480 with next command:
>
> h323gk gnugk # ulimit -f 20480
>
> i setup
>
> fs.file-max=102024
>
> fs.file-max=This is the number of concurrently open file descriptors
> throughout the system. It defaults to 8192.
>
> I increased abnormaly
>
> CallSignalHandlerNumber=60
> RtpHandlerNumber=30
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________________
Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/
Dani Popa
--
Dani Popa
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________________ Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users Homepage: http://www.gnugk.org/