与Redis配对时ejabberd Crash的原因是什么?

时间:2016-04-15 07:21:53

标签: tcp redis xmpp ejabberd

我已经能够扩展到超过一百万用户使用 How to scale ejabberd Server machine on CentOS to handle 200 K connections?

我现在使用Redis作为ejabberd的后端。

在一百万用户之后,我收到以下错误:

    2016-04-15 12:50:24 =ERROR REPORT====
** State machine <0.24986.34> terminating 
** Last event in was {xmlstreamelement,{xmlel,<<"iq">>,[{<<"type">>,<<"set">>},{<<"id">>,<<"820919">>}],[{xmlel,<<"bind">>,[{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-bind">>}],[{xmlel,<<"resource">>,[],[{xmlcdata,<<"tsung">>}]}]}]}}
** When State == wait_for_bind
**      Data  == {state,{socket_state,gen_tcp,#Port<0.418817>,<0.24984.34>},ejabberd_socket,#Ref<0.0.36.113046>,false,<<"2087913259">>,undefined,c2s,c2s_shaper,false,true,false,false,[verify_none,compression_none,{protocol_options,<<"no_sslv3">>},{certfile,<<"/opt/ejabberd-15.11/conf/ejabberd.pem">>}],true,undefined,<<"mac52944bec562c9c82eae8e818abdea7e4b">>,<<"ejabberd-benchmark">>,<<>>,{{1460,704802,37025},<0.24986.34>},{pres_t,0},{pres_f,0},{pres_a,0},undefined,undefined,{userlist,none,[],false},unknown,ejabberd_auth_external,{{10,245,32,24},29307},[],active,[],inactive,undefined,undefined,1000,undefined,300,300,true,0,0,<<>>}
** Reason for termination = 
** {timeout,{gen_server,call,[ejabberd_redis_client,{request,[[<<"*">>,"2",<<"\r\n">>],[[<<"$">>,"7",<<"\r\n">>,<<"HGETALL">>,<<"\r\n">>],[<<"$">>,"67",<<"\r\n">>,<<"ejabberd:sm:mac52944bec562c9c82eae8e818abdea7e4b@ejabberd-benchmark">>,<<"\r\n">>]]]},20000]}}

1 个答案:

答案 0 :(得分:1)

此错误仅表示您的系统已饱和。它本身并不意味着什么。 您必须进行分析以找出用例的瓶颈,调整平台并可能优化代码。