the UDP socket option should be using non-block mode which need to not take
EAGAIN return value for read/write as an error. it means 'no socket buffer
for now, please try again later' for write UDP, or 'no packet received yet
in the buffer' for read.
solution: for write, please set socket option to increase receive buffer to
a larger value (such as 1 MB), for read, please return normally and retry
the receiving next time.
2013/8/27 Edwin Mons <edwin.mons_at_isode.com>
> We're using C-ARES to do DNS resolving in our products. During high
> network load, we hit an issue in ares_process.c:785 where writing to a UDP
> socket on Linux fails with an EAGAIN error. The FIXME comment in the code
> suggests this could happen, but it is as of yet left unresolved.
> Part of the problem is that if an EAGAIN hits, the code immediately
> switches to the next server, increases the try_again counter and
> immediately fires off a new request. If the system is particularly busy,
> EAGAIN will likely happen for subsequent writes, resulting in many failed
> Is anyone already looking into this?
Received on 2013-08-28