[erlang-questions] gen_udp:send blocks?

Roger Lipscombe <>
Fri Sep 7 12:11:17 CEST 2018

I've got a gen_server that, in response to handle_cast, calls
gen_udp:send. On one server, the call to gen_udp:send takes about
1500us. On a different server, the call takes about 75000us.

Because of this, the process message queue is getting backed up, at
the rate of about 120-250 messages/minute.

The difference between the servers is obvious: one of them is in the
same AWS region as the destination host; the other is the other side
of the Atlantic (i.e. about 70ms away).

My question is more about understanding the semantics of gen_udp:send:
why is it blocking? If the buffer was full, I'd expect it to discard
the message and return immediately.


More information about the erlang-questions mailing list