From: hno <> Date: Tue, 6 May 2003 06:17:06 +0000 (+0000) Subject: Bug #590: Hang on shutdown with "externalAclLookup: 'xxx' queue overload" X-Git-Tag: SQUID_3_0_PRE1~212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95a83c22c183cd097c1af3bcc16d8ebab156116a;p=thirdparty%2Fsquid.git Bug #590: Hang on shutdown with "externalAclLookup: 'xxx' queue overload" repeatedly logged in cache.log --- diff --git a/src/external_acl.cc b/src/external_acl.cc index de690e130c..11458a0f5f 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -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; } diff --git a/src/main.cc b/src/main.cc index 88c6b93a17..50c0644eff 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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