Re: clientReadRequest: 1.1.22

From: Duane Wessels <wessels@dont-contact.us>
Date: Fri, 24 Jul 1998 12:10:15 -0600

Tim Thornley writes:

>I am seeing squid trying to talk to a browser that has gone away ... I get
>this in the cache log until it runs out of space or someone sends it a kill -1
>
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>1998/07/22 21:13:21| clientReadRequest: FD 24: (11) Try again
>
>I am using Linux 2.0.34 and squid 1.1.22 on what started life as RedHat 4.2

This patch should make Squid stop trying again after 20 read errors:

Index: src/icp.c
===================================================================
RCS file: /surf1/CVS/squid/src/Attic/icp.c,v
retrieving revision 1.228.2.49
diff -w -u -r1.228.2.49 icp.c
--- icp.c 1998/05/01 23:21:00 1.228.2.49
+++ icp.c 1998/07/24 18:08:06
@@ -1797,7 +1797,8 @@
         comm_close(fd);
         return;
     } else if (size < 0) {
- if (errno == EWOULDBLOCK || errno == EAGAIN) {
+ icpState->read_err_count++;
+ if ((errno == EWOULDBLOCK || errno == EAGAIN) && icpState->read_err_count < 20) {
             debug(50, 0, "clientReadRequest: FD %d: %s\n", fd, xstrerror());
             commSetSelect(fd,
                 COMM_SELECT_READ,
Index: src/icp.h
===================================================================
RCS file: /surf1/CVS/squid/src/Attic/icp.h,v
retrieving revision 1.64.2.8
diff -w -u -r1.64.2.8 icp.h
--- icp.h 1997/12/15 08:43:21 1.64.2.8
+++ icp.h 1998/07/24 18:07:04
@@ -201,6 +201,7 @@
     } ident;
     int ip_lookup_pending;
     int redirect_state;
+ int read_err_count;
 } icpStateData;
 
 extern void *icpCreateMessage _PARAMS((icp_opcode opcode,

Duane W.
Received on Fri Jul 24 1998 - 11:11:46 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:41:15 MST