Archive Index This month's Index

Subject: Hitting EAGAIN in ares_process.c:787

Hitting EAGAIN in ares_process.c:787

From: Edwin Mons <>
Date: Mon, 26 Aug 2013 18:06:45 +0200


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 lookups.

Is anyone already looking into this?

Received on 2013-08-26