Hi guys. I'm using squid 3.1.4 and since of first 3.1 stable release I'm suffering from memory leak problems too. My production server is a CentOS 5.4 32 bits (kernel 2.6.18-164.6.1.el5). It has 2GB of RAM (512MB reserved to squid cache_mem) and 6GB of disk space reserved to squid's disk cache. In approximately 24h, squid consumes all the available memory of my server and swap starts to be consumed. I'm currently restarting squid once a day in order to workaround the problem. Follow attached a squidclient output made some hours before all the server memory be consumed.
HTTP/1.0 200 OK Server: squid Mime-Version: 1.0 Date: Wed, 02 Jun 2010 02:22:12 GMT Content-Type: text/plain Expires: Wed, 02 Jun 2010 02:22:12 GMT Last-Modified: Wed, 02 Jun 2010 02:22:12 GMT X-Cache: MISS from proxyweb.ipasgo.go.gov.br Via: 1.0 proxyweb.ipasgo.go.gov.br (squid) Proxy-Connection: close Squid Object Cache: Version 3.1.4 Start Time: Tue, 01 Jun 2010 02:59:02 GMT Current Time: Wed, 02 Jun 2010 02:22:12 GMT Connection information for squid: Number of clients accessing cache: 1 Number of HTTP requests received: 1607991 Number of ICP messages received: 0 Number of ICP messages sent: 0 Number of queued ICP replies: 0 Number of HTCP messages received: 0 Number of HTCP messages sent: 0 Request failure ratio: 0.00 Average HTTP requests per minute since start: 1146.0 Average ICP messages per minute since start: 0.0 Select loop called: 21704724 times, 3.879 ms avg Cache information for squid: Hits as % of all requests: 5min: 1.3%, 60min: 2.5% Hits as % of bytes sent: 5min: 99.3%, 60min: 93.0% Memory hits as % of hit requests: 5min: 100.0%, 60min: 100.0% Disk hits as % of hit requests: 5min: 0.0%, 60min: 0.0% Storage Swap size: 5662188 KB Storage Swap capacity: 90.0% used, 10.0% free Storage Mem size: 420444 KB Storage Mem capacity: 80.7% used, 19.3% free Mean Object Size: 21.29 KB Requests given to unlinkd: 0 Median Service Times (seconds) 5 min 60 min: HTTP Requests (All): 0.00463 0.00463 Cache Misses: 0.00307 0.28853 Cache Hits: 0.00000 0.00000 Near Hits: 0.00000 0.00000 Not-Modified Replies: 0.00000 0.00000 DNS Lookups: 0.00860 0.00860 ICP Queries: 0.00000 0.00000 Resource usage for squid: UP Time: 84190.610 seconds CPU Time: 2395.902 seconds CPU Usage: 2.85% CPU Usage, 5 minute avg: 0.05% CPU Usage, 60 minute avg: 0.05% Process Data Segment Size via sbrk(): 1081804 KB Maximum Resident Size: 0 KB Page faults with physical i/o: 2522 Memory usage for squid via mallinfo(): Total space in arena: 1081936 KB Ordinary blocks: 1079110 KB 7695 blks Small blocks: 0 KB 0 blks Holding blocks: 3492 KB 7 blks Free Small blocks: 0 KB Free Ordinary blocks: 2825 KB Total in use: 1082602 KB 100% Total free: 2825 KB 0% Total size: 1085428 KB Memory accounted for: Total accounted: 550778 KB 51% memPool accounted: 550778 KB 51% memPool unaccounted: 534649 KB 49% memPoolAlloc calls: 307930462 memPoolFree calls: 308780650 File descriptor usage for squid: Maximum number of file descriptors: 4096 Largest file desc currently in use: 92 Number of file desc currently in use: 46 Files queued for open: 0 Available number of file descriptors: 4050 Reserved number of file descriptors: 100 Store Disk files open: 0 Internal Data Structures: 266030 StoreEntries 57596 StoreEntries with MemObjects 57595 Hot Object Cache Items 266004 on-disk objects