tor 2006-03-02 klockan 16:10 +0000 skrev Paul Mattingly: > When I load the current squid configuration from cache manager, squid > shoots up to 99% CPU load and then the browser crashes. I have to send a > shutdown signal to regain normality. I guess the browser just cannot > handle displaying 550,000 entries. It is a shame because I find the > config display very useful Testing.. (without the browser). Looks like it will take a while... not something to do in production as all other requests are blocked while this is taking place.. It took 15 seconds for Squid to initially load the config, ages to dump it out but eventually it will complete I guess. But it might take hours.. (at least two very inefficient layers of code involved here..) maybe I should resurrect that old patch of mine which dumps the actual squid.conf line rather than the expanded acl.. if I only could remember where it is.. looking. Ah, in neger got to that point. Trivial change however if desired [patch attached], but it has some limitations and won't reflect the config entirely accurately if you have a include acl split over multiple lines.. Regards Henrik
Index: src/cache_cf.c =================================================================== RCS file: /cvsroot/squid/squid/src/cache_cf.c,v retrieving revision 1.396.2.32 diff -u -p -r1.396.2.32 cache_cf.c --- src/cache_cf.c 26 Oct 2005 20:25:42 -0000 1.396.2.32 +++ src/cache_cf.c 2 Mar 2006 23:17:21 -0000 @@ -600,21 +600,25 @@ parseBytesUnits(const char *unit) static void dump_acl(StoreEntry * entry, const char *name, acl * ae) { - wordlist *w; - wordlist *v; while (ae != NULL) { debug(3, 3) ("dump_acl: %s %s\n", name, ae->name); - v = w = aclDumpGeneric(ae); - while (v != NULL) { - debug(3, 3) ("dump_acl: %s %s %s\n", name, ae->name, v->key); - storeAppendPrintf(entry, "%s %s %s %s\n", - name, - ae->name, - aclTypeToStr(ae->type), - v->key); - v = v->next; + if (strstr(ae->cfgline, " \"")) + storeAppendPrintf(entry, "%s\n", ae->cfgline); + else { + wordlist *w; + wordlist *v; + v = w = aclDumpGeneric(ae); + while (v != NULL) { + debug(3, 3) ("dump_acl: %s %s %s\n", name, ae->name, v->key); + storeAppendPrintf(entry, "%s %s %s %s\n", + name, + ae->name, + aclTypeToStr(ae->type), + v->key); + v = v->next; + } + wordlistDestroy(&w); } - wordlistDestroy(&w); ae = ae->next; } }
Attachment:
signature.asc
Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel