diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-14 04:19:12 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-14 04:19:12 +0000 |
commit | 05c05d6444dfbab2ada8eb3127a51aff7920c6ca (patch) | |
tree | 5b2efadb5317dc2c1f46277600cd05c32c475e09 /src/or/dns.c | |
parent | 9e3608ce7b2c3178bb2781e32c8bdc320527664b (diff) | |
download | tor-05c05d6444dfbab2ada8eb3127a51aff7920c6ca.tar.gz tor-05c05d6444dfbab2ada8eb3127a51aff7920c6ca.zip |
more friendly warning when there are too many dns workers
svn:r919
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index ff1d332ba2..923b10e568 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -357,7 +357,7 @@ int dnsworker_main(void *data) { for(;;) { if(read(fd, &question_len, 1) != 1) { - log_fn(LOG_ERR,"read length failed. Child exiting."); + log_fn(LOG_INFO,"read length failed. Child exiting."); spawn_exit(); } assert(question_len > 0); @@ -436,7 +436,7 @@ static void spawn_enough_dnsworkers(void) { dnsconn = connection_get_by_type_state_lastwritten(CONN_TYPE_DNSWORKER, DNSWORKER_STATE_BUSY); assert(dnsconn); - log_fn(LOG_DEBUG, "Max DNS workers spawned; all are busy. Killing one."); + log_fn(LOG_WARN, "%d DNS workers are spawned; all are busy. Killing one.", MAX_DNSWORKERS); /* tell the exit connection that it's failed */ dns_cancel_pending_resolve(dnsconn->address, NULL); @@ -460,6 +460,8 @@ static void spawn_enough_dnsworkers(void) { while(num_dnsworkers > num_dnsworkers_needed+MAX_IDLE_DNSWORKERS) { /* too many idle? */ /* cull excess workers */ + log_fn(LOG_WARN,"%d of %d dnsworkers are idle. Killing one.", + num_dnsworkers-num_dnsworkers_needed, num_dnsworkers); dnsconn = connection_get_by_type_state(CONN_TYPE_DNSWORKER, DNSWORKER_STATE_IDLE); assert(dnsconn); dnsconn->marked_for_close = 1; |