Re: [squid-users] headers.log crash

From: Mike Kiernan <mkiernan@dont-contact.us>
Date: Mon, 27 Aug 2001 10:03:36 +0200

Just for the record (no replies); this change disables headers.log:

http.c:
    /* append X-Forwarded-For */
/**
    if (httpRequestHdrAllowedByName(HDR_X_FORWARDED_FOR)) {
        String strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR);
        strListAdd(&strFwd, (cfd < 0 ? "unknown" :
fd_table[cfd].ipaddr), ',');
        httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd));
        {
        Logfile *logfile;
        logfile=logfileOpen("/var/log/squid/headers.log", 512,1);
        logfilePrintf(logfile, "X_FORWARDED_FOR %s ", strBuf(strFwd));
        strFwd = httpHeaderGetList(hdr_in, HDR_X_SOURCE_IP);
        strListAdd(&strFwd, (cfd < 0 ? "unknown" :
fd_table[cfd].ipaddr), ',');
        logfilePrintf(logfile, "HDR_X_SOURCE_IP %s\n", strBuf(strFwd));
        logfileClose(logfile);
        stringClean(&strFwd);
        }
    }
**/

cheers,
Mike

> One of my squids just died with:
>
> 2001/08/24 15:20:22| storeDirWriteCleanLogs: Starting...
> 2001/08/24 15:20:23| WARNING: Closing open FD 130
> 2001/08/24 15:20:23| Finished. Wrote 0 entries.
> 2001/08/24 15:20:23| Took 0.0 seconds ( 0.0 entries/sec).
> FATAL: logfileWrite: /var/log/squid/headers.log: (0) Success
>
> Squid Cache (Version 2.4.STABLE1): Terminated abnormally.
> CPU Usage: 20603.910 seconds = 8029.970 user + 12573.940 sys
> Maximum Resident Size: 0 KB
> Page faults with physical i/o: 416
> Memory usage for squid via mallinfo():
> total space in arena: 95042 KB
> Ordinary blocks: 92079 KB 106167 blks
> Small blocks: 0 KB 0 blks
> Holding blocks: 3000 KB 6 blks
> Free Small blocks: 0 KB
> Free Ordinary blocks: 2962 KB
> Total in use: 95079 KB 100%
> Total free: 2962 KB 3%
> 2001/08/24 15:20:26| Starting Squid Cache version 2.4.STABLE1 for
> i686-pc-linux-gnu...
>
> /var/log/squid/headers.log was rather big:
>
> -rw-r--r-- 1 proxy proxy 2147483647 Aug 24 15:20 headers.log
>
> It wouldn't restart until I removed the file.
>
> This log is not documented; it's pretty useless to me;
> just contains thousands of lines of:
>
> X_FORWARDED_FOR a.b.c.d HDR_X_SOURCE_IP e.f.g.h
>
> how do I disable this log??
>
> thanks.
>
> -- Mike

--
Onet.pl S.A.
http://www.onet.pl/
Krakow, Poland
Received on Mon Aug 27 2001 - 02:03:03 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:55 MST