0
我使用localhost:27019,27020,27021作爲mongodb服務器 當我第一次用5個線程連接它時,每個進程讀取一個data.it會拋出異常。如果我使用3或更少的線程,它會沒事的。erlang與多線程連接mongodb錯誤
,但是當我通過3線在連接與它取得成功,如果我用的100個相同的連接,它不會,除非我重新連接mongoserver拋出異常了。
=ERROR REPORT==== 3-Aug-2013::11:28:37 ===
** Generic server <0.164.0> terminating
** Last message in was {modify,#Fun<mvar.2.15158540>}
** When Server state == {{dict,3,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],
[[{"192.168.17.100",27019}|{}]],
[],
[[{"192.168.17.100",27021}|{}]],
[],[],[],[],[],[],
[[{"192.168.17.100",27020}|{}]],
[],[],[]}}},
#Fun<mvar.1.22957847>}
** Reason for termination ==
** {badarg,[{dict,fetch,
[{"localhost",27021},
{dict,3,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],
[[{"192.168.17.100",27019}|{}]],
[],
[[{"192.168.17.100",27021}|{}]],
[],[],[],[],[],[],
[[{"192.168.17.100",27020}|{}]],
[],[],[]}}}]},
{mongo_replset,remove_host,2},
{sets,fold_bucket,3},
{sets,fold_seg,4},
{sets,fold_segs,4},
{mongo_replset,'-fetch_member_info/1-fun-3-',3},
{mvar,'-modify_/2-fun-0-',2},
{mvar,handle_call,3}]}
Pid {<0.88.0>,
{badarg,[{dict,fetch,
[{"localhost",27021},
{dict,3,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],
[[{"192.168.17.100",27019}|{}]],
[],
[[{"192.168.17.100",27021}|{}]],
[],[],[],[],[],[],
[[{"192.168.17.100",27020}|{}]],
[],[],[]}}}]},
{mongo_replset,remove_host,2},
{sets,fold_bucket,3},
{sets,fold_seg,4},
{sets,fold_segs,4},
{mongo_replset,'-fetch_member_info/1-fun-3-',3},
{mvar,'-modify_/2-fun-0-',2},
{mvar,handle_call,3}]}} Exit!!!!!