Search squid archive

Re: {SPAM??} Re: [squid-users] Persistent Server Connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please keep discussion on the mailinglist.

On Fri, 2 Sep 2005, Jerry Thomas wrote:

Hello Henrik,

You know I tried it again. and the same thing happened. All the apache
processes were waiting for keep alive requests.

I am using custom compiled version/removed open ssl since I did not need
it.

I believe though that I had the same issue with the Fedora rpm.

I do have a lot of virtual hosts.

Perhaps this is your problem. I think Squid may maintains the persistent connections independetly per host, even if the ip:port is the same.

Looking.. almost correct. See below.


Here is part of the squid.conf
request_timeout 30 seconds
persistent_request_timeout 30 seconds
server_persistent_connections off

httpd_accel_single_host On

This is the root cause to your problems. In this mode Squid gets a bit confused and server-side persistent connections does not work proper as the connection detail does not match the request, making the persistent connections build up and never get reused.

If you like you can file a bug report on this issue, and maybe it will get fixed for 2.5.STABLE12 if there is such release.

  http://www.squid-cache.org/bugs/

but there is good workarounds available. See below for details.

httpd_accel_host 127.0.0.1
httpd_accel_port 80
httpd_accel_with_proxy off
httpd_accel_uses_host_header on

Any thoughts would be helpful.

My recommended vhosting setup works fine without these problems

Squid-2.5:

 httpd_accel_host your.primary.site
 httpd_accel_port 80 (or 0, if you accelerate multiple ports)
 httpd_accel_with_proxy on
 httpd_accel_uses_host_header on

 acl myservers dst ip.of.real.server ...
 acl http protocol http
 acl port80 port 80

 http_access allow http port80 myservers
 http_access deny all

/etc/hosts:

ip.of.real.server   accelerated.domain1 accelerated.domain2 accelerated.domain3 ...



In Squid-3 the same config is slightly different and in my eyes simpler:

 http_port 80 accel vhost defaultsite=your.primary.site

 cache_peer ip.of.real.server 80 0 no-query originserver name=name.of.real.server

 acl mysites dstdomain accelerated.domain1 accelerated.domain2 accelerated.domain3 ...
 acl http protocol http
 acl port80 port 80

 http_access allow http port80 mysites
 cache_peer_access name.of.real.server allow mysites

 never_direct allow all

Regards
Henrik

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux