I realized that the server reply both 403 and 404. About 404, but I don't know how to cache 404 File Not Found reply from original servers, should I add a default error page on web application for invalid URLs ? I tested and saw that cache misses on those URLs because we don't have a default error page now : 404 TCP_MISS:FIRST_UP_PARENT Kien Le On Wed, May 11, 2011 at 10:12 AM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: > On Wed, 11 May 2011 10:01:59 +0700, Le Trung Kien wrote: >> >> Hi, I checked that "negative_ttl" and it's definitely not in my squid.conf >> :) >> And, I'm also checking our orignial servers for 404 and 30x return >> codes if they don't work properly. >> I have one more question for sure: Will Squid remembers invalid URLs >> (for moment) and return the error page without validating those >> invalid URLs against original servers ? > > Yes.... I said: > >>> Squid is capable and will cache both 404 replies and 30x redirects if the >>> origin sets the headers correctly to allow caching. ie Expires: header a >>> year in the future, or Last-Modified some time in the past with storage >>> friendly Cache-Control: values. > > > The bigger problem appears to be that the server is sending some garbage > that produces a 5xx from inside *Squid* ("Invalid Response"). The HTTP > standards are being broken. Squid does not cache its own problem reports. > >> >> Thank you, Amos >> Kien Le. >> >> On Tue, May 10, 2011 at 7:27 PM, Amos Jeffries <squid3@xxxxxxxxxxxxx> >> wrote: >>> >>> On 10/05/11 20:58, Le Trung Kien wrote: >>>> >>>> Hi, we're trying Squid v3 for reverse proxy using, and explore that we >>>> receive too many access requests for old invalid URLs from client and >>>> this makes our Squid Caches slow down our original servers by >>>> attempting sending requests to retrieve information from original >>>> servers. >>>> >>>> This is from our squid cache.log: >>>> >>>> WARNING: HTTP: Invalid Response: No object data received for >>>> invalid_urls AKA invalid_urls >>>> >>>> I have questions that: >>>> Is there any way to delay or suspend squid's responding for these >>>> repeated requests after certain times squid cannot retrieve content >>>> for invalid URLs and return a default error page ? >>> >>> First, make sure that "negative_ttl" directive is *absent* from your >>> squid.conf >>> >>> Then fin out why your origin servers are producing garbage instead of a >>> 404 >>> or 30x reply like they should be. >>> >>> Squid is capable and will cache both 404 replies and 30x redirects if the >>> origin sets the headers correctly to allow caching. ie Expires: header a >>> year in the future, or Last-Modified some time in the past with storage >>> friendly Cache-Control: values. >>> >>> Amos >>> -- >>> Please be using >>> Current Stable Squid 2.7.STABLE9 or 3.1.12 >>> Beta testers wanted for 3.2.0.7 and 3.1.12.1 >>> > >