[or-cvs] more friendly warning when there are too many dns workers
Roger Dingledine
arma at seul.org
Sun Dec 14 04:19:14 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuit.c dns.c
Log Message:
more friendly warning when there are too many dns workers
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- circuit.c 13 Dec 2003 07:42:18 -0000 1.114
+++ circuit.c 14 Dec 2003 04:19:12 -0000 1.115
@@ -833,7 +833,7 @@
if(circ->cpath->state == CPATH_STATE_CLOSED) {
assert(circ->n_conn && circ->n_conn->type == CONN_TYPE_OR);
-
+
log_fn(LOG_DEBUG,"First skin; sending create cell.");
circ_id_type = decide_circ_id_type(options.Nickname,
circ->n_conn->nickname);
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- dns.c 14 Dec 2003 00:12:02 -0000 1.41
+++ dns.c 14 Dec 2003 04:19:12 -0000 1.42
@@ -357,7 +357,7 @@
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 @@
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 @@
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;
More information about the tor-commits
mailing list