[squid-users] tcp timeout issue

2007-10-02 Thread Frank Ruiz
Greetings,

I patched squid2.6 stable 14 with the tcp probe patch.

It patched two files:

cache_cf.c
neighbors.c

However, After about 14 hours of good runtime, my response times,
began to suck, and began to see errors again indicative of the tcp
probe issue:

2007/10/02 01:57:15| Detected REVIVED Parent: 10.10.10.20
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed
2007/10/02 01:57:16| Detected DEAD Parent: 10.10.10.20
2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed


The origin server is available, however I keep getting
revivied/connectionfailed/dead

It seems that the only way to recover from this is a restart.

I am running solaris 10, and I had to download the gnu patch utility
in order to patch the src.

Here was the patch applied.

Index: src/cache_cf.c
===
RCS file: /cvsroot/squid/squid/src/cache_cf.c,v
retrieving revision 1.470
diff -u -p -r1.470 cache_cf.c
--- src/cache_cf.c  20 Jul 2007 21:08:47 -  1.470
+++ src/cache_cf.c  28 Aug 2007 23:46:47 -
@@ -1621,6 +1621,7 @@ parse_peer(peer ** head)
 p-stats.logged_state = PEER_ALIVE;
 p-monitor.state = PEER_ALIVE;
 p-monitor.interval = 300;
+p-tcp_up = PEER_TCP_MAGIC_COUNT;
 if ((token = strtok(NULL, w_space)) == NULL)
self_destruct();
 p-host = xstrdup(token);
Index: src/neighbors.c
===
RCS file: /cvsroot/squid/squid/src/neighbors.c,v
retrieving revision 1.318
diff -u -p -r1.318 neighbors.c
--- src/neighbors.c 20 Jul 2007 21:08:47 -  1.318
+++ src/neighbors.c 28 Aug 2007 23:46:47 -
@@ -1010,12 +1010,13 @@ peerDNSConfigure(const ipcache_addrs * i
debug(0, 0) (WARNING: No IP address found for '%s'!\n, p-host);
return;
 }
-p-tcp_up = PEER_TCP_MAGIC_COUNT;
 for (j = 0; j  (int) ia-count  j  PEER_MAX_ADDRESSES; j++) {
p-addresses[j] = ia-in_addrs[j];
debug(15, 2) (-- IP address #%d: %s\n, j, inet_ntoa(p-addresses[j]))
;
p-n_addresses++;
 }
+if (!p-tcp_up)
+   peerProbeConnect((peer *) p);
 ap = p-in_addr;
 memset(ap, '\0', sizeof(struct sockaddr_in));
 ap-sin_family = AF_INET;

Any ideas is much appreciated. Any special debug info you need, please
let me know.

Also, as I side note, I have monitorurl set as well

cache_peer 10.10.10.20 parent 80 0 no-query no-digest originserver
monitorinterval=30 monitorurl=http://10.10.10.20/test.jpg

Thank you!


Re: [squid-users] tcp timeout issue

2007-10-02 Thread Henrik Nordstrom
On tis, 2007-10-02 at 11:35 -0700, Frank Ruiz wrote:
 Greetings,
 
 I patched squid2.6 stable 14 with the tcp probe patch.

Why not upgrade to 2.6.STABLE16 instead?

 However, After about 14 hours of good runtime, my response times,
 began to suck, and began to see errors again indicative of the tcp
 probe issue:
 
 2007/10/02 01:57:15| Detected REVIVED Parent: 10.10.10.20
 2007/10/02 01:57:16| TCP connection to 10.10.10.20/80 failed

This means Squid could not connect to the peer. Might be as simple as
there being too many connections to the peer already.

Regards
Henrik