<div dir="ltr">You may want to start by updating to a more recent version to rule out anything already improved.<div>It may be environmental since it started happening after it was once working better but its hard to tell and hard to debug older versions.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 13, 2013 at 3:11 PM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr">&lt;<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I&#39;ll be on the FS conference call for the next 30 mins if you want to ask any questions about this btw.<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Cal</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 13, 2013 at 9:10 PM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr">&lt;<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Fri, Dec 13, 2013 at 8:37 PM, Tim St. Pierre <span dir="ltr">&lt;<a href="mailto:fs-list@communicatefreely.net" target="_blank">fs-list@communicatefreely.net</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I&#39;m having a problem where FS seems to exhaust it&#39;s open file limit<br>
after about 7 hours of operation.  Once this happens, the database and<br>
curl connections no longer function, and I usually lose the ability to<br>
get a CLI connection.  Existing calls usually stay up, until I kill -9<br>
and launch again.<br>
<br>
I&#39;m using FreeSWITCH Version 1.2.8+git~20130403T221701Z~79be96aa8e<br>
on Centos 2.6.18-348.el5<br>
<br>
This machine had been running solid for at least 90 days without a hitch<br>
- I had almost hit 500K sessions, when this started happening two days<br>
ago.  I have changed very little on the machine - the odd dialplan<br>
route, and nothing that seems to coincide with that time.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<br>
It looks like CURL is not closing sockets properly, as netstat shows<br>
between 2000 - 4000 http connections in TIME_WAIT state.  The number<br>
slowly creeps up, then down a little, then up some more until it all<br>
comes crashing down.<br></blockquote><div><br></div></div><div>Can you confirm if your web server is responding to the requests?</div><div><br></div><div>One possible explanation is this spike in traffic caused excessive requests which your web server could not handle, and thus you hit the ulimit.</div>


<div><br></div><div>You could increase the ulimit (or set it to unlimited) as per;</div><div><a href="http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/" target="_blank">http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/</a><br>


</div><div><br></div><div>However, if your web server is struggling to keep up with the work load then increasing the max open files will just make the problem worse. Increasing is fine, as long as your web server can keep up with the load, otherwise it will just continue to snowball.</div>


<div><br></div><div>Try installing some profiling tools on your web server to monitor the stats, you can use something like New Relic or AppNeta for this, or even just change your access log to output the loading/response times into your access log, then look for high response times.</div>


<div><br></div><div>You can also tweak kernel TCP stack settings as per;</div><div><a href="http://www.cyberciti.biz/faq/linux-command-forcibly-close-socket-ports-in-time_wait-state/" target="_blank">http://www.cyberciti.biz/faq/linux-command-forcibly-close-socket-ports-in-time_wait-state/</a><br>


</div><div><br></div><div>Hope this helps</div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<br>
ls /proc/15742/fd|wc -l currently returns about 400.  It was 300 an hour<br>
ago.  When it gets to 1024, I&#39;m going to have to restart again.<br>
<br>
Any suggestions as to where I should look?<br>
<br>
-Tim<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div>
<div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br>
</div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a>  ☎ +19193869900 </div><div><br></div></div></div></div>
</div>