[asterisk-bugs] [Asterisk 0015627]: Asterisk runs out of sockets

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Aug 9 00:01:45 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15627 
====================================================================== 
Reported By:                falves11
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15627
Category:                   Core/Netsock
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 209626 
Request Review:              
====================================================================== 
Date Submitted:             2009-07-31 17:12 CDT
Last Modified:              2009-08-09 00:01 CDT
====================================================================== 
Summary:                    Asterisk runs out of sockets
Description: 
The Parallels engineers have found a bug that takes down asterisk because
the server runs out of sockets, and also it degrades the performance
because over time it takes more and more time for the processor to find an
empty socket. The load on the processor grows over time,

====================================================================== 

---------------------------------------------------------------------- 
 (0108814) falves11 (reporter) - 2009-08-09 00:01
 https://issues.asterisk.org/view.php?id=15627#c108814 
---------------------------------------------------------------------- 
My socket count gets to 80.000 on a single day and the server collapses. I
process over a million of calls per day. If the culprit cannot be found,
then Asterisk should provide a "core clean sockets" function that will free
any sockets not in use by any object. I would run htat very hour and the
system would be stable. I noticed that Asterisk constantly drops calls
because RTP timeout, which I set to 30 seconds. This could be the issue,
the leaking mechanism. In any case we could create a version that logs what
function allocates what socket number, and at the end of the day we could
print "lsof -i | grep UDP" and see what sockets are still alive. I don't
have any calls after 8 PM. Or I could change the inbound bindport for SIP
and wait until no more calls are alive (my calls are very short), and then
compare what sockets are still open. But how do I get a log of what
function name allocates what socket number? Can somebody provide a patch
that stores to a file the name of the function and the UDP port allocted? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-09 00:01 falves11       Note Added: 0108814                          
======================================================================




More information about the asterisk-bugs mailing list