I have written Java client for http_bind. Clients logins as much users as he can(in seperate threads) and sends as much messages as he can(~300 logged users and ~600 sent messages in 15 seconds) After 15 seconds server starts to send 404 File Not Found messages and logs this message to log file.
=ERROR REPORT==== 2008-03-06 16:54:06 === ** State machine <0.2434.0> terminating ** Last message in was {'$gen_sync_all_state_event', {<0.2438.0>,#Ref<0.0.0.30682>}, {http_put, 1798441521, [{"rid","1798441521"}, {"sid", "d6a8d1a56df3baaf91f4dcfe087a720e58689e41"}, {"xmlns", "http://jabber.org/protocol/httpbind"}], [], 1, []}} ** When State == loop ** Data == {state,"d6a8d1a56df3baaf91f4dcfe087a720e58689e41", 1798441522, [], [], [], false, <0.2435.0>, 0, undefined, undefined, 1204818846890005, #Ref<0.0.0.30684>, 0, [{hbr,1798441522,[],[],[]}]} ** Reason for termination = ** {{badmatch,[]}, [{ejabberd_http_bind,handle_sync_event,4}, {gen_fsm,handle_msg,7}, {proc_lib,init_p,5}]}
Do you have an idea how can I avoid this error.
The termination is done in
The termination is done in the file ejabberd_http_bind.erl in the function clause that starts with:
Unfortunately, this function is very large (177 lines of code), so it is difficult to know the exact reason of {badmatch,[]} without some debugging.
A simple way to debug the code would be to add lines like this in that function:
And check up to which one gets executed.