]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #590: Hang on shutdown with "externalAclLookup: 'xxx' queue overload"
authorhno <>
Tue, 6 May 2003 06:17:06 +0000 (06:17 +0000)
committerhno <>
Tue, 6 May 2003 06:17:06 +0000 (06:17 +0000)
repeatedly logged in cache.log

src/external_acl.cc
src/main.cc

index de690e130c0a2cb422af3ca9b14fff406ce096cc..11458a0f5fe298edfd2a64b8c81ec187c8495db7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: external_acl.cc,v 1.36 2003/05/06 00:13:39 hno Exp $
+ * $Id: external_acl.cc,v 1.37 2003/05/06 00:20:03 hno Exp $
  *
  * DEBUG: section 82    External ACL
  * AUTHOR: Henrik Nordstrom, MARA Systems AB
@@ -533,7 +533,12 @@ aclMatchExternal(external_acl_data *acl, ACLChecklist * ch)
 
     if (!entry || entry->result == -1) {
         debug(82, 2) ("aclMatchExternal: %s(\"%s\") = lookup needed\n", acl->def->name, key);
-        ch->changeState (ExternalACLLookup::Instance());
+
+        if (acl->def->helper->stats.queue_size >= acl->def->helper->n_running)
+            debug(82, 1) ("aclMatchExternal: '%s' queue overload. Request rejected.\n", acl->def->name);
+        else
+            ch->changeState (ExternalACLLookup::Instance());
+
         return 0;
     }
 
index 88c6b93a176c668e4c6e4531f131e0552ee29946..50c0644effb7c5c47010630a8d45848798e34d35 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.377 2003/04/27 00:29:07 hno Exp $
+ * $Id: main.cc,v 1.378 2003/05/06 00:17:06 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -1097,16 +1097,6 @@ main(int argc, char **argv)
 #endif
 
             serverConnectionsClose();
-#if USE_DNSSERVERS
-
-            dnsShutdown();
-#else
-
-            idnsShutdown();
-#endif
-
-            redirectShutdown();
-            externalAclShutdown();
             eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1);
         }
 
@@ -1420,6 +1410,16 @@ SquidShutdown(void *unused)
 #endif
 
     debug(1, 1) ("Shutting down...\n");
+#if USE_DNSSERVERS
+
+    dnsShutdown();
+#else
+
+    idnsShutdown();
+#endif
+
+    redirectShutdown();
+    externalAclShutdown();
     icpConnectionClose();
 #if USE_HTCP