summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-12-14 04:19:12 +0000
committerRoger Dingledine <arma@torproject.org>2003-12-14 04:19:12 +0000
commit05c05d6444dfbab2ada8eb3127a51aff7920c6ca (patch)
tree5b2efadb5317dc2c1f46277600cd05c32c475e09
parent9e3608ce7b2c3178bb2781e32c8bdc320527664b (diff)
downloadtor-05c05d6444dfbab2ada8eb3127a51aff7920c6ca.tar.gz
tor-05c05d6444dfbab2ada8eb3127a51aff7920c6ca.zip
more friendly warning when there are too many dns workers
svn:r919
-rw-r--r--src/or/circuit.c2
-rw-r--r--src/or/dns.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 540a624a5f..471428ef40 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -833,7 +833,7 @@ int circuit_send_next_onion_skin(circuit_t *circ) {
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);
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;