[ejabberd] getting emfile errors

Sylvain Niles sylvain.niles at gmail.com
Mon Jan 11 22:26:52 MSK 2010


You're missing two more steps:

The system file descriptor limit is set in /proc/sys/fs/file-max. The
following command will increase the limit to 65535:
echo 65535 > /proc/sys/fs/file-max

You should then be able to increase the file descriptor limits using:
ulimit -n unlimited

Even with it set to unlimited the user will be limited by the settings
in limits.conf.

You can verify whether this is the issue by typing:
ulimit -a | grep open


Hope this helps,
Sylvain


On Mon, Jan 11, 2010 at 11:06 AM, Mark Keisler <grimm26 at gmail.com> wrote:
> Linux.  I stated that I did increase the max number of open files to 16384.
> % tail -2 /etc/security/limits.conf
> jabber  soft    nofile  16384
> jabber  hard    nofile  16384
>
> And sysctl shows:
> fs.file-max = 787722
>
> The system isn't coming close to that.  And, like I said, lsof shows just
> over 1000 filehandles open by jabber when ejabberd starts erroring.
>
> --
> Mark
> "Blessed is he who finds happiness in his own foolishness, for he will
> always be happy."
>
>
> On Mon, Jan 11, 2010 at 1:02 PM, Brian Acton <acton at whatsapp.com> wrote:
>>
>> BSD or Linux?...You need to raise the number of maximum open files. This
>> is usually a combination of sysctl, ulimit, /etc/security/limits.conf etc
>>
>> --b
>>
>>
>> On Mon, Jan 11, 2010 at 10:11 AM, Mark Keisler <mark at mitsein.net> wrote:
>>>
>>> Oops, forgot to put erlang version: R13B02
>>>
>>> --
>>> Mark
>>> "Blessed is he who finds happiness in his own foolishness, for he will
>>> always be happy."
>>>
>>>
>>> On Mon, Jan 11, 2010 at 11:56 AM, Mark Keisler <mark at mitsein.net> wrote:
>>>>
>>>> I'm running ejabberd 2.1.1 with erlang
>>>> At first, I could only get very few concurrent users connected.  Now I
>>>> have set ERL_MAX_PORTS=8192 and max open file ulimit to 16384 for my jabber
>>>> user that runs ejabberd.  I can only get 983 users connectedm then it starts
>>>> throwing:
>>>> I(<0.463.0>:ejabberd_listener:241) : (#Port<0.7155>) Failed TCP accept:
>>>> emfile
>>>>
>>>> I am using test users with internal authentication.  Using lsof, I only
>>>> see 1127 filehandles opened by the jabber user at the peak.  Why am I
>>>> getting emfile errors?
>>>>
>>>>
>>>> --
>>>> Mark
>>>> "Blessed is he who finds happiness in his own foolishness, for he will
>>>> always be happy."
>>>
>>>
>>> _______________________________________________
>>> ejabberd mailing list
>>> ejabberd at jabber.ru
>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>>
>>
>>
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>


More information about the ejabberd mailing list