Comment 8 for bug 198646

Revision history for this message
Henrik Nordström (henriknordstrom) wrote :

There is a Squid bug/misfeature which may be relevant here depending on the size of the requested .pack file.

If the first range in a partial request is byte 0 then Squid attempts to prefetch the whole file to cache it for future reference. This may take a considerable amount of time if the requested file is large. Normally this just causes a delay, but depending on timeout settings in firewalls between the client and Squid I guess this delay may cause the request to get terminated while waiting for the next chunk.

This was fixed in the 2.6.STABLE19 release made yesterday to not do this kind of prefetching unless explicitly enabled in squid.conf.

A workaround is to use a non-linear range request. I.e. instead of the first requested range being 0-400 use 200-400,0-199 or something similar.

This Squid prefetching induced delay issue is only triggered if the following conditions are all met:

- A ranged request with the first range starting at 0 (range_offset_limit setting in squid.conf, default 0)
- The ranges is sorted linearly
- There is a huge gap in the ranges of data to be skipped

The first two is the conditions for this unintentional prefetch to trigger in Squid.

The third (last) is the condition for this to cause a significant delay while processing the request