--------------------- PatchSet 6138 Date: 2004/02/04 17:31:08 Author: hno Branch: ntlmcleanup Tag: ntlmcleanup-20030206 Log: Make warning message on helper overload more informative Members: src/helper.c:1.16.2.10.6.2->1.16.2.10.6.3 Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/helper.c,v retrieving revision 1.16.2.10.6.2 retrieving revision 1.16.2.10.6.3 diff -u -r1.16.2.10.6.2 -r1.16.2.10.6.3 --- squid/src/helper.c 4 Feb 2004 17:21:33 -0000 1.16.2.10.6.2 +++ squid/src/helper.c 4 Feb 2004 17:31:08 -0000 1.16.2.10.6.3 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.16.2.10.6.2 2004/02/04 17:21:33 hno Exp $ + * $Id: helper.c,v 1.16.2.10.6.3 2004/02/04 17:31:08 hno Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -749,11 +749,12 @@ if (shutting_down || reconfiguring) return; hlp->last_queue_warn = squid_curtime; - debug(84, 0) ("WARNING: All %s processes are busy.\n", hlp->id_name); - debug(84, 0) ("WARNING: %d to %d pending requests queued\n", hlp->stats.queue_size, hlp->stats.max_queue_size); + debug(84, 1) ("WARNING: All %s processes are busy.\n", hlp->id_name); + debug(84, 1) ("WARNING: up to %d pending requests queued\n", hlp->stats.max_queue_size); if (hlp->stats.queue_size > hlp->n_running * 2) - fatalf("Too many queued %s requests (%d/%d)", hlp->id_name, hlp->stats.queue_size, hlp->n_running); - debug(84, 1) ("Consider increasing the number of %s processes in your config file.\n", hlp->id_name); + fatalf("Too many queued %s requests (%d on %d)", hlp->id_name, hlp->stats.queue_size, hlp->n_running); + if (hlp->stats.max_queue_size > 1) + debug(84, 1) ("Consider increasing the number of %s processes to at least %d in your config file.\n", hlp->id_name, hlp->n_running + hlp->stats.max_queue_size); hlp->stats.max_queue_size = hlp->stats.queue_size; } @@ -768,15 +769,16 @@ if (hlp->stats.queue_size > hlp->stats.max_queue_size) hlp->stats.max_queue_size = hlp->stats.queue_size; if (hlp->stats.queue_size > hlp->n_running * 5) - fatalf("Too many queued %s requests (%d/%d)", hlp->id_name, hlp->stats.queue_size, hlp->n_running); + fatalf("Too many queued %s requests (%d on %d)", hlp->id_name, hlp->stats.queue_size, hlp->n_running); if (squid_curtime - hlp->last_queue_warn < 30) return; if (shutting_down || reconfiguring) return; hlp->last_queue_warn = squid_curtime; - debug(84, 0) ("WARNING: All %s processes are busy.\n", hlp->id_name); - debug(84, 0) ("WARNING: %d to %d pending requests queued\n", hlp->stats.queue_size, hlp->stats.max_queue_size); - debug(84, 1) ("Consider increasing the number of %s processes in your config file.\n", hlp->id_name); + debug(84, 1) ("WARNING: All %s processes are busy.\n", hlp->id_name); + debug(84, 1) ("WARNING: up to %d pending requests queued\n", hlp->stats.max_queue_size); + if (hlp->stats.max_queue_size > 1) + debug(84, 1) ("Consider increasing the number of %s processes to at least %d in your config file.\n", hlp->id_name, hlp->n_running + hlp->stats.max_queue_size); hlp->stats.max_queue_size = hlp->stats.queue_size; }