[Freeswitch-users] Socket Error [Too many open files]

Colin Morelli colin.morelli at gmail.com
Tue Dec 6 17:54:13 MSK 2016


When you say "I set the configuration below" - did you set this by
executing the ulimit command or by editing /etc/security/limits.conf (or
the equivalent for your distro)? IIRC the ulimit commands only change the
limits for the current shell and its children. Depending on how FS is
launched, it may very well not be a child of the current shell (or it's
forking off as a different user), and as such those limits aren't applying.

You can run "cat /proc/FS_PID/limits" to see the actual limits imposed on
the FS process(es)

Best,
Colin

On Tue, Dec 6, 2016 at 9:48 AM, Brian West <brian at freeswitch.org> wrote:

> I can only guess you've done something or are using something that isn't
> closing the FD, Can you elaborate on what kinds of elements you have in
> your call flow?  Conference, files, lua or some other scripts that might
> access files?
>
> /b
>
>
> On Tue, Dec 6, 2016 at 9:44 AM, Caio Assis <caioebassis at hotmail.com>
> wrote:
>
>> Good afternoon.
>>
>>
>> Freeswitch info:
>>
>> Freeswitch version: Version 1.6.12  64bit
>> O.S: Centos 7
>> Processor: Xeon Six Core
>> RAM: 8GB
>> Disk: SSD samsung 850 pro
>>
>> I've been facing a problem with freeswitch.
>> When I generate many calls (around 300 calls), Freeswitch service stops
>> receiving socket connection after this error:
>>
>> [ERR] mod_event_socket.c:3017 Error initilizing connection
>> [CRIT] mod_event_socket.c:235 Stateful Listener 0 has expired
>> [ERR] mod_event_socket.c:2975 Socket Error [Too many open files]
>>
>>
>> I set the configuration below, but the problem persists and I have to
>> restart the service to get it back up.
>>
>> ulimit -c unlimited # The maximum size of core files created.
>> ulimit -d unlimited # The maximum size of a process's data segment.
>> ulimit -f unlimited # The maximum size of files created by the shell (default option)
>> ulimit -i unlimited # The maximum number of pending signals
>> ulimit -n 999999    # The maximum number of open file descriptors.
>> ulimit -q unlimited # The maximum POSIX message queue size
>> ulimit -u unlimited # The maximum number of processes available to a single user.
>> ulimit -v unlimited # The maximum amount of virtual memory available to the process.
>> ulimit -x unlimited # ???
>> ulimit -s 240         # The maximum stack size
>> ulimit -l unlimited # The maximum size that may be locked into memory.
>> ulimit -a           # All current limits are reported.
>>
>>
>> I can't execute any freeswitch command, fs_cli -x "show calls", fs_cli -r, they all return that socket error.
>>
>>
>> Thanks.
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
>
> *Brian West*
> brian at freeswitch.org
>
>
> *Twitter: @FreeSWITCH , @briankwest*
> http://www.freeswitchbook.com (50% Discount using code FreeSwitch50)
> http://www.freeswitchcookbook.com (50% Discount using code FreeSwitch50)
> https://www.gofundme.com/freeswitch_ubuntu
>
> Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit:
> /r/freeswitch <https://www.reddit.com/r/freeswitch>
>
> *T:*+19184209001 <(918)%20420-9001> | *F:*+19184209002 <(918)%20420-9002>
> | *M:*+1918424WEST (9378)
> *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161206/8da637bf/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list