Search squid archive

Linux: Cannot bind to socket ...

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

 



Hi,

I run into issue with socket in the server where I use squid. Below is my server configuration:

Squid 2.6. stable 4 - 20061009
Linux AS server version 4, update 3
Dell 2950, 16 GB RAM, 2 dual core CPU, six 164 GB SAS disk, RAID controller.
RAID 0 implementation with prefetch read, write back policy.

The squid is configured in reverse proxy mode with 120 domains, 8 origin servers. (origin server is apache 2.2.0 on linux)
Request object size = 1064 Bytes
Number of unique object = 1 million
Object's TTL=5 minutes
Persistent connection to server = on
Persistent connection to client = off
The squid has 32768 max file descriptor
90+% hit ratio.

I send a load of 4000-5000 request/second to the server. After about 5 hours, the ability to serve 5000 requests drops and the cache.log is filled with error 'commBind: Cannot bind socket FD 204 to *:0: (98) Address already in use

I suspect the server run out of socket, so I run netstat to capture the open/pending to close socket and there I see one origin has approximate 8000 connection in TIME_WAIT state .. looks like the socket is close but the OS keep it open for a bit longer in case the data is not transmitted complete. That seems to be one problem so I want to reduce the TIME_WAIT.

I did research on how to reduce the TIME_WAIT and one recommendation is to change the tcp_fin_timeout to 30 (original value is 60), tcp_sack=0 (original value=1), tcp_window_scaling=0 (original value=1), tcp_keepalive_time=2400 (my value=1800).

Any recommendation or suggestion are greatly appreciated ? Or my issue is entirely different? since the error in cache.log says it tries to bind to port 0. Seems pretty odd, but at least the excessive number of TIME_WAIT connection on the server bothers me.

Thanks,
Khanh


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

  Powered by Linux