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

Robert Virding <>
Thu Jan 19 17:36:52 CET 2012


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 

----- Original Message -----

> 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.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120119/d26d0cf7/attachment.html>


More information about the erlang-questions mailing list