[erlang-questions] Exmpp gen_fsm, sync_send_event, timeout exception

21 views
Skip to first unread message

Alexander Kuleshov

unread,
Jan 10, 2012, 9:28:19 AM1/10/12
to erlang-questions
Hello,

I run ejabberd and try to run 1000 bot written with exmpp.  All bots login and nothing do. When I run around 900 +-50 bots i got error:

** exception exit: {timeout,{gen_fsm,sync_send_event, [<0.2899.0>, {connect_socket,"my-host",5222,[]}, 5000]}}

How can i avoid this?

Thank you.

Robert Virding

unread,
Jan 19, 2012, 11:36:52 AM1/19/12
to Alexander Kuleshov, erlang-questions
Hi,

gen_fsm:sync_send_event/2 has a default timeout of 5000ms which means that if it doesn't get a reply from the FSM within that time the function generates an error and the process crashes. This seems like what has happened to you. One solution is to use gen_fsm:sync_send_event/3 where you can set the timeout value. Another is to find out why the FSM is taking so long time and if there is anything you can do about it.

Robert


_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Reply all
Reply to author
Forward
0 new messages