If-Unmodified-Since implementation question

2011-03-10 Thread Guy Bashkansky
, 2011 at 2:38 PM, Guy Bashkansky guy...@gmail.com wrote: I have to modify the behavior of a customized version of Squid 2.4 STABLE6 code, either by configuration or by coding.  Currently I can not switch to any other Squid version, because of the customizations. Problem description: - When

Caching huge files in chunks?

2010-09-16 Thread Guy Bashkansky
Here is the problem description, what solution might Squid or other cache tools provide? Some websites serve huge files, usually movies or binary distributions. Typically a client issues byte range requests, which are not cacheable as separate objects in Squid. Waiting for the whole file to be

Failure recovery, reconfiguration/restart during rebuild (Was: How to ignore query terms for store key?)

2010-09-08 Thread Guy Bashkansky
2010/9/8 Henrik Nordström hen...@henriknordstrom.net: tis 2010-09-07 klockan 18:59 -0700 skrev Guy Bashkansky: /usr/local/squid/bin/strip-query.pl     #!/usr/local/bin/perl -Tw     $| = 1; while() { chomp; s/\?\S*//; print; } ### my strip query test If you chomp the newline then you need

How to ignore query terms for store key?

2010-09-07 Thread Guy Bashkansky
Is there a way to ignore URI query terms when forming store keys? Maybe some rule or extension? In the Squid code it could look something like: { char *p = strchr(uri, '?'); if (p) *p = '\0'; } But the only code like this deals with strip_query_terms. This rule only affects logging, not storing.

High CPU load; debug log shows tight loop: storeDiskdDirRebuildFromSwapLog ... new_StoreEntry ... storeDirSwapLog ... diskHandleWrite

2010-01-07 Thread Guy Bashkansky
I'm observing very high Squid CPU load, which negatively affects performance. Enabling debug_options ALL,9 for a few seconds shows this extremely frequent loop -- Squid is doing only this millions of times: 2010/01/07 12:29:23| storeDiskdDirRebuildFromSwapLog: SWAP_LOG_ADD

Re: [squid-users] 'gprof squid squid.gmon' only shows the initial configuration functions

2009-12-09 Thread Guy Bashkansky
] 20060305 There are 7 fork()s for unlinkd/diskd helpers. Can these fork()s affect profiling info? On Wed, Dec 9, 2009 at 2:04 AM, Robert Collins robe...@robertcollins.net wrote: On Tue, 2009-12-08 at 15:32 -0800, Guy Bashkansky wrote: I've built squid with the -pg flag and run it in the no-daemon

'gprof squid squid.gmon' only shows the initial configuration functions

2009-12-08 Thread Guy Bashkansky
I've built squid with the -pg flag and run it in the no-daemon mode (-N flag), without the initial fork(). I send it the SIGTERM signal which is caught by the signal handler, to flag graceful exit from main(). I expect to see meaningful squid.gmon, but 'gprof squid squid.gmon' only shows the

Squid at 100% CPU with 10 minutes period

2009-12-04 Thread Guy Bashkansky
Hi, The problem: on a certain origin content, Squid reaches 100% CPU periodically, every 10 minutes, so the cache service suffers. Any clues where to look? Maybe this problem and its solution are known? The CPU load pattern is something like this, minute-by-minute: 40%, 40%, 60%, 80%, 99%,

Re: If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

2009-09-02 Thread Guy Bashkansky
the Squid artifact of inserting an Expires header. Is there a Squid configuration ability to do so? If not, what would be the right way to do it in my local code branch? On Fri, Aug 28, 2009 at 6:12 PM, Guy Bashkansky guy...@gmail.com wrote: Henrik, Thanks, it works! Guy On Thu, Aug 27, 2009

If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

2009-08-26 Thread Guy Bashkansky
I've tried to set an exact time-to-live (override origin cache control) in Squid (2.4 STABLE6) configuration by refresh_pattern, e.g.: refresh_pattern   30_minutes_cache_control_url   15   0%   15 override-expire   ignore-max-age Observed: URL is matched (in log), but objects still cached for 30