I'm experiencing very strange behaivoir of ejabberd: mnesia gets overloaded when I'm near 180 connections so no new connections is allowed anymore.
I created the script that just takes file of usernames and passwords and connects and auth in cycle. No matter how fast it happens (I tried from 0 to 2 seconds delay) I'm getting disconnected after 178 connections (plus there are about 6 exist that are not involved into experiment).
Can anybody can give a hint what is wrong in my case? I used 0.9.1 before and was able to make about a thousand of connections finely and now I have 1.1.1 version (plus http-binding patch) and can't get up to 200! :(
At the moment of problem ejabberd.log begins to contain this:
=ERROR REPORT==== 2006-06-15 04:48:25 ===
Mnesia(ejabberd@localhost): ** WARNING ** Mnesia is overloaded: {dump_log,
time_threshold}
and sasl.log this:
=CRASH REPORT==== 15-Jun-2006::04:37:43 ===
crasher:
pid: <0.3223.1>
registered_name: []
error_info: {enfile,[{erlang,open_port,[{spawn,expat_erl},[binary]]},
{xml_stream,new,2},
{ejabberd_receiver,init,1},
{gen_server,init_it,6},
{proc_lib,init_p,5}]}
initial_call: {gen,init_it,
[gen_server,
<0.219.0>,
<0.219.0>,
ejabberd_receiver,
[#Port<0.1760623>,gen_tcp,none,infinity,<0.3222.1>],
[]]}
ancestors: [ejabberd_receiver_sup,ejabberd_sup,<0.37.0>]
messages: []
links: [<0.219.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 377
stack_size: 21
reductions: 100
neighbours:
=CRASH REPORT==== 15-Jun-2006::04:37:43 ===
crasher:
pid: <0.3222.1>
registered_name: []
error_info: {{badmatch,{error,{enfile,
[{erlang,
open_port,
[{spawn,expat_erl},[binary]]},
{xml_stream,new,2},
{ejabberd_receiver,init,1},
{gen_server,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_receiver,start,4},
{ejabberd_c2s,init,1},
{gen_fsm,init_it,6},
{proc_lib,init_p,5}]}
initial_call: {gen,init_it,
[gen_fsm,
<0.220.0>,
<0.220.0>,
ejabberd_c2s,
[{gen_tcp,#Port<0.1760623>},
[{access,c2s},
{shaper,c2s_shaper},
starttls,
{certfile,"/etc/ssl/certs/ejabberd.pem"}]],
[]]}
ancestors: [ejabberd_c2s_sup,ejabberd_sup,<0.37.0>]
messages: []
links: [<0.220.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 377
stack_size: 21
reductions: 120
neighbours:
=CRASH REPORT==== 15-Jun-2006::04:37:43 ===
crasher:
pid: <0.2859.1>
registered_name: []
error_info: {{badmatch,{error,{{badmatch,
{error,
{enfile,
[{erlang,
open_port,
[{spawn,expat_erl},
[binary]]},
{xml_stream,new,2},
{ejabberd_receiver,init,1},
{gen_server,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_receiver,start,4},
{ejabberd_c2s,init,1},
{gen_fsm,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_listener,accept,3},{proc_lib,init_p,5}]}
initial_call: {ejabberd_listener,init,
[5222,
ejabberd_c2s,
[{access,c2s},
{shaper,c2s_shaper},
starttls,
{certfile,"/etc/ssl/certs/ejabberd.pem"}]]
}
ancestors: [ejabberd_listeners,ejabberd_sup,<0.37.0>]
messages: []
links: [#Port<0.1760623>,<0.228.0>,#Port<0.1755093>]
dictionary: []
trap_exit: false
status: running
heap_size: 233
stack_size: 21
reductions: 36016
neighbours:
=SUPERVISOR REPORT==== 15-Jun-2006::04:37:43 ===
Supervisor: {local,ejabberd_listeners}
Context: child_terminated
Reason: {{badmatch,{error,{{badmatch,
{error,
{enfile,
[{erlang,
open_port,
[{spawn,expat_erl},
[binary]]},
{xml_stream,new,2},
{ejabberd_receiver,init,1},
{gen_server,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_receiver,start,4},
{ejabberd_c2s,init,1},
{gen_fsm,init_it,6},
{proc_lib,init_p,5}]}}},
[{ejabberd_listener,accept,3},{proc_lib,init_p,5}]}
Offender: [{pid,<0.2859.1>},
{name,5222},
{mfa,{ejabberd_listener,
start,
[5222,
ejabberd_c2s,
[{access,c2s},
{shaper,c2s_shaper},
starttls,
{certfile,"/etc/ssl/certs/ejabberd.pem"}]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]
=PROGRESS REPORT==== 15-Jun-2006::04:37:43 ===
supervisor: {local,ejabberd_listeners}
started: [{pid,<0.3224.1>},
{name,5222},
{mfa,{ejabberd_listener,
start,
[5222,
ejabberd_c2s,
[{access,c2s},
{shaper,c2s_shaper},
starttls,
{certfile,"/etc/ssl/certs/ejabberd.pem"}]]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]
Are you connected with the
Are you connected with the same user and a different resources each time ?
Process-one
--
Mickaël Rémond
> error_info:
> error_info: {enfile,[{erlang,open_port,[{spawn,expat_erl},[binary]]}
From Erlang documentation:
enfile
A file or port table is full.
During use of a port opened using {spawn,Name}, errors arising when sending messages to it are reported to the owning process using signals of the form {'EXIT',Port,PosixCode}. Posix codes listed in the documentation for the file module.
The maximum number of ports that can be open at the same time is 1024 by default, but can be configured by the environment variable ERL_MAX_PORTS.