[squid-users] Origin server timeout

2007-08-21 Thread Frank Ruiz
Greetings,

I have an origin server that timeous up for up to 1 minute during
extreme conditions. As a result, time_wait connections on the squid
host go through the roof.

Can someone please recommend what tunables can be adjusted to fix this?

I currently have:
peer_connect_timeout

set to:
5 seconds



Is there anything else that can be done, or should I further reduce the timeout?

Thank you in advance!


Re: [squid-users] Origin server timeout

2007-08-21 Thread Adrian Chadd
If you're referring to the TIME_WAIT in "netstat -an" then you have to
find the "maximum segment lifetime" TCP config knob for your operating
system and drop that down.



Adrian

On Tue, Aug 21, 2007, Frank Ruiz wrote:
> Greetings,
> 
> I have an origin server that timeous up for up to 1 minute during
> extreme conditions. As a result, time_wait connections on the squid
> host go through the roof.
> 
> Can someone please recommend what tunables can be adjusted to fix this?
> 
> I currently have:
> peer_connect_timeout
> 
> set to:
> 5 seconds
> 
> 
> 
> Is there anything else that can be done, or should I further reduce the 
> timeout?
> 
> Thank you in advance!

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level bandwidth-capped VPSes available in WA -


Re: [squid-users] Origin server timeout

2007-08-22 Thread Henrik Nordstrom
On tis, 2007-08-21 at 16:09 -0700, Frank Ruiz wrote:
> Greetings,
> 
> I have an origin server that timeous up for up to 1 minute during
> extreme conditions. As a result, time_wait connections on the squid
> host go through the roof.

TIME_WAIT sockets stay around for one minue or two after the
request/connection has been closed. It's not normally a problem and just
how TCP/IP works, but if you run a very high request rate then the
server may run out of free ports due to all ports being used by
TIME_WAIT sockets.

First action to take is to increase the range of free ports. The default
varies a lot between different OS:es and versions, from 4K to 30K.
TCP/IP allows for up to 60K ports,

In Linux

echo 1024 65535 >/proc/sys/net/ipv4/ip_local_port_range

Regards
Henrik