[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: spawn_enough_dnsworkers

On Thu, Jun 23, 2005 at 09:25:21AM +0200, tildeOne tor router wrote:
> I keep getting this error from time to time after a couple of hours 
> leaving the server unreachable (which is beacuse it is not running 
> anymore as I can see when trying to restart).

Unreachable? From the log you pasted, it seems like it's doing fine.

> I'm running version on a linux box.
> Jun 23 07:55:33.087 [notice] spawn_enough_dnsworkers(): 8 of 11 
> dnsworkers are idle. Killing one.
> Any ideas?

Typically "notice" level logs are not errors, but just things for you
to keep in mind or things for you say "hmmm" if they start showing up
many times a second. Check out the code, in src/or/dns.c: (hope this
helps -- you can just look at the comments, no need to worry about the
syntax details)

 * \file dns.c
 * \brief Implements a farm of 'DNS worker' threads or processes to
 * perform DNS lookups for onion routers and cache the results.
 * [This needs to be done in the background because of the lack of a
 * good, ubiquitous asynchronous DNS implementation.]


/** If more than this many processes are idle, shut down the extras. */


/** If we have too many or too few DNS workers, spawn or kill some.
static void
  int num_dnsworkers_needed; /* aim to have 1 more than needed,
                              * but no less than min and no more than max

  while (num_dnsworkers > num_dnsworkers_busy+MAX_IDLE_DNSWORKERS) {
    /* too many idle? */
    /* cull excess workers */
    log_fn(LOG_NOTICE,"%d of %d dnsworkers are idle. Killing one.",
           num_dnsworkers-num_dnsworkers_needed, num_dnsworkers);