> > Hi Amos > > Answer to your questions > >> What exactly is this 504 error saying? > > - Timeout issue to the backend servers > - The servers will be in an overload state because all the requests are being sent to the backend > >> And why are the 200 status when they do occur taking so very long to generate? > > - The load balancer will be switching from PRD to DR because of PRD overload state > > Our Setup > > -----> = traffic flow > > Apache / Squid ----------> F5 Load balancer ------> Origin servers (CMS System) > > This configuration allows us to Load Balance between PRD and DR servers (CMS) > > - When the Purge request is sent tp the Backend Origin servers the cms system goes into an overload state > - The health checks on the Load balancer will fail and divert the traffic from PRD to DR backend (PRD and DR are replicated environments) > > Extra Info -- Purge Option > > - We Provide the University Staff a PHP page to clear objects of squid cache > - The tool calls CURL and sends a Purge request > > Code > > $ch = curl_init(); > curl_setopt($ch, CURLOPT_URL, $value); > curl_setopt($ch, CURLOPT_PROXY, $proxyserver); > curl_setopt($ch, CURLOPT_CUSTOMREQUEST , "PURGE"); > curl_setopt($ch, CURLOPT_TIMEOUT, 5); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); > curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); > curl_setopt($ch, CURLOPT_HEADER, true); > curl_setopt($ch, CURLOPT_NOBODY, true); > > if (!curl_exec($ch)) { return false; } > curl_close($ch); > > >> What are the headers sent from the origin server to Squid? > > Cached Request from Local Workstation to Squid > > reidwatson:script rwat090$ curl -I http://www.test.auckland.ac.nz/uoa/ > HTTP/1.1 200 OK > Date: Fri, 28 Jun 2013 02:21:45 GMT > Server: Apache-Coyote/1.1 > Cache-Control: no-cache > Pragma: no-cache > Expires: Thu, 01 Jan 1970 00:00:00 GMT > Content-Type: text/html;charset=UTF-8 > Age: 77 > X-Cache: HIT from webroute.test.auckland.ac.nz > X-Cache-Lookup: HIT from webroute.test.auckland.ac.nz:3128 > Via: 1.0 webroute-test1.its.auckland.ac.nz (squid) > Set-Cookie: webroute=server.; path=/; > Vary: Accept-Encoding > Set-Cookie: BIGipServer~Devtest~webroute-test-80_pool=310641930.20480.0000; path=/ > > Request after PURGE -- Local Workstation to Squid then Backend server > > 1372386101.882 0 10.1.1.1 TCP_MISS/200 295 PURGE http://www.test.auckland.ac.nz/uoa/ - NONE/- - > > curl -I http://www.test.auckland.ac.nz/uoa/ > HTTP/1.1 200 OK > Date: Fri, 28 Jun 2013 02:21:45 GMT > Server: Apache-Coyote/1.1 > Cache-Control: no-cache > Pragma: no-cache > Expires: Thu, 01 Jan 1970 00:00:00 GMT > Content-Type: text/html;charset=UTF-8 > X-Cache: MISS from webroute.test.auckland.ac.nz > X-Cache-Lookup: MISS from webroute.test.auckland.ac.nz:3128 > Via: 1.0 webroute-test1.its.auckland.ac.nz (squid) > Set-Cookie: JSESSIONID=40F3613FE4AC815A87CAC858EE38E112.jvm1; Path=/ > Set-Cookie: Jesi_Template_Username=guest; Path=/ > Set-Cookie: webroute=server.; path=/; > Vary: Accept-Encoding > Set-Cookie: BIGipServer~Devtest~webroute-test-80_pool=310641930.20480.0000; path=/ > > > I have also include a wire shark dump from the request after the purge -- From Backend server > > GET /uoa/ HTTP/1.1 > Host: www.test.auckland.ac.nz > User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0 > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 > Accept-Language: en-gb,en;q=0.5 > Accept-Encoding: gzip, deflate > Cookie: __utma=18951208.362154167.1367379679.1372030825.1372114069.43; __utmz=18951208.1367379679.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=265832586.969691744.1368401175.1372300411.1372385456.16; __utmz=265832586.1372193146.14.3.utmcsr=iam.test.auckland.ac.nz|utmccn=(referral)|utmcmd=referral|utmcct=/profile/SAML2/Redirect/SSO; __utmc=18951208; BIGipServer~Devtest~webroute-test-443_pool=327419146.47873.0000; webroute=server.; __utmc=265832586; _shibsession_63656e7472616c2d74657374687474703a2f2f7777772e746573742e6175636b6c616e642e61632e6e7a=_298760cf8dc4f7d5ae29a97b3febbf5f; JSESSIONID=F81F7E49D3DE061EE0358E77B9D604EC.jvm1; Jesi_Template_Username=guest; BIGipServer~Devtest~webroute-test-80_pool=327419146.20480.0000; __utmb=265832586.4.10.1372385456; __atuvc=2%7C26 > X-Forwarded-Protocol: http > X-Forwarded-User: > X-Forwarded-Host: www.test.auckland.ac.nz > X-Forwarded-Server: www.test.auckland.ac.nz > Via: 1.1 webroute-test1.its.auckland.ac.nz (squid) > Surrogate-Capability: unset-id="Surrogate/1.0 ESI/1.0" > X-Forwarded-For: 130.216.168.2, 127.0.0.1 > Cache-Control: max-age=259200 > Connection: keep-alive > > Cheers > > Reid > > > On 27/06/2013, at 2:34 AM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: > >> On 25/06/2013 5:51 p.m., Reid Watson wrote: >>> Hi, >>> >>> We seem to be having a strange issue with SQUID caching an object once it has been purged - this issue does not occur with all objects within the cache.. >>> >>> Quick Overview >>> >>> - Four Apache Server with Squid Installed >>> - RedHat 5.7 i386 >>> - squid-3.1.8-1.el5 >>> >>> >>> Issue >>> >>> - Admin sends a Purge request simultaneously to all four server >>> >>> Example >>> 1372113766.459 0 10.10.10.10 TCP_MISS/200 280 PURGE http://www.auckland.ac.nz/uoa/ - NONE/- - >>> >>> - Squid seems to fail on caching the object >>> - All requests are sent to backend servers >>> >>> Server 1 >>> 1372113766.459 0 10.10.10.10 TCP_MISS/200 280 PURGE http://www.auckland.ac.nz/uoa/ - NONE/- - >>> 372113766.779 23 10.10.10.3 TCP_MISS/504 5063 GET http://www.auckland.ac.nz/uoa/ - NONE/- text/html >> >> What exactly is this 504 error saying? >> >>> 1372114043.139 106378 127.0.0.1 TCP_MISS/200 9891 GET http://www.auckland.ac.nz/uoa/ - FIRST_UP_PARENT/vip-dr text/html >>> 1372114043.303 10112 127.0.0.1 TCP_MISS/500 24731 GET http://www.auckland.ac.nz/uoa/ - ANY_PARENT/vip-dr text/html >>> 1372114105.918 0 10.10.10.3 TCP_MISS/504 4591 GET http://www.auckland.ac.nz/uoa/ - NONE/- text/html >>> 1372114106.414 57182 127.0.0.1 TCP_MISS/200 69995 GET http://www.auckland.ac.nz/uoa/ - FIRST_UP_PARENT/vip-dr text/html >>> 1372114106.419 55771 127.0.0.1 TCP_MISS/200 45853 GET http://www.auckland.ac.nz/uoa/ - ANY_PARENT/vip-dr text/html >>> 1372114106.436 17387 127.0.0.1 TCP_MISS/200 69967 GET http://www.auckland.ac.nz/uoa/ - FIRST_UP_PARENT/vip-dr text/html >>> 1372114106.490 60516 127.0.0.1 TCP_MISS/200 70115 GET http://www.auckland.ac.nz/uoa/ - FIRST_UP_PARENT/vip-dr text/html >>> 1372114106.707 58628 127.0.0.1 TCP_MISS/200 70115 GET http://www.auckland.ac.nz/uoa/ - ANY_PARENT/vip-dr text/html >> >> And why are the 200 status when they do occur taking so very long to generate? >> >>> - if you send a reload command (/sbin/service squid reload) the object is stored within the cache instanlty >> >> What are the headers sent from the origin server to Squid? >> >> Amos >> >