[squid-users] Multiple responses in cache objects
Tobias Wolter
tobias.wolter at b1-systems.de
Mon Apr 23 12:43:46 UTC 2018
Cheers,
I'm having some pretty weird issues with a customer's squid
installation - we're seeing multiple responses in a single cache
object.
Sadly, this isn't a singular incident and seems to be happening more
often recently. We've rolled back all changes since the date people
first started noticing the issues, but it still hasn't helped.
This occasionally leads to e.g. fragged CSS files, which users see by
the way of the stylesheet not working.
I'm currently out of debugging ideas. Aside from the rollback, we've
thus far isolated it to the Squid; the Apache which is the originserver
for this successfully returns the correct site.
As far as the setup goes, this is the pipeline:
* Squid (terminates SSL)
* Apache (cache_peer, originserver, same host as squid)
* Tomcat (via AJP from Apache, different hos)
Apparently, there is a point when a request to the squid takes a while
(~15s), and after that, there's something corrupted in the cache.
Any hints and help would be greatly appreciated.
Some pastes, with examples and data:
/var/cache/squid # grep -acr 'HTTP/1.1' . | grep -v 1$ | grep -v
swap.state
./02/C9/0002C9D3:2
./02/55/000255F5:2
./01/B0/0001B001:2
./00/04/00000498:2
./00/7F/00007F1F:2
./00/28/0000282E:2
# grep -aA5 'HTTP/1.1' ./02/C9/0002C9D3
ȺHTTP/1.1 200 OK
Server: squid
Mime-Version: 1.0
Date: Mon, 23 Apr 2018 11:49:23 GMT
X-Transformed-From: HTTP/0.9
--
HTTP/1.1 304 Not Modified
Date: Mon, 23 Apr 2018 11:49:25 GMT
Server: Apache
Connection: Keep-Alive
Keep-Alive: timeout=15, max=87
ETag: "ca8-55ef60f57e009"
pws2:/var/cache/squid # grep -aA14 'HTTP/1.1' ./02/55/000255F5
FHTTP/1.1 200 OK
Server: squid
Mime-Version: 1.0
Date: Sat, 14 Apr 2018 12:07:30 GMT
X-Transformed-From: HTTP/0.9
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
<html>
<head>
<script type="text/javascript">var contextPath = '';</script>
<script type="text/javascript" src="/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/js/layer.js"></script>
<script type="text/javascript" src="/js/jquery.colorbox-1.5.15.min.js"></script>
<script type="text/javascript" src="/js/cookies.js"></script>
--
HTTP/1.1 200 OK
Date: Sat, 14 Apr 2018 12:07:30 GMT
Server: Apache
X-FRAME-OPTIONS: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Last-Modified: Fri, 13 Apr 2018 13:31:28 GMT
Cache-Control: max-age=300
Expires: Sat, 14 Apr 2018 12:12:30 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=15, max=97
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=ISO-8859-1
# squidclient mgr:info:
Squid Object Cache: Version 3.5.21
Build Info:
Service Name: squid
Start Time: Mon, 23 Apr 2018 11:50:30 GMT
Current Time: Mon, 23 Apr 2018 12:41:11 GMT
Connection information for squid:
Number of clients accessing cache: 407
Number of HTTP requests received: 13262
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: 261.6
Average ICP messages per minute since start: 0.0
Select loop called: 197830 times, 15.374 ms avg
Cache information for squid:
Hits as % of all requests: 5min: 52.3%, 60min: 64.0%
Hits as % of bytes sent: 5min: 40.6%, 60min: 54.3%
Memory hits as % of hit requests: 5min: 74.3%, 60min: 78.0%
Disk hits as % of hit requests: 5min: 0.1%, 60min: 0.1%
Storage Swap size: 3949688 KB
Storage Swap capacity: 77.1% used, 22.9% free
Storage Mem size: 36168 KB
Storage Mem capacity: 4.6% used, 95.4% free
Mean Object Size: 79.26 KB
Requests given to unlinkd: 3272
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.01309 0.00179
Cache Misses: 0.02317 0.02592
Cache Hits: 0.00000 0.00000
Near Hits: 0.01745 0.01745
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.02231 0.02336
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 3041.448 seconds
CPU Time: 49.352 seconds
CPU Usage: 1.62%
CPU Usage, 5 minute avg: 1.63%
CPU Usage, 60 minute avg: 1.63%
Maximum Resident Size: 340384 KB
Page faults with physical i/o: 1
Memory accounted for:
Total accounted: 49999 KB
memPoolAlloc calls: 3344459
memPoolFree calls: 3360309
File descriptor usage for squid:
Maximum number of file descriptors: 4096
Largest file desc currently in use: 101
Number of file desc currently in use: 69
Files queued for open: 0
Available number of file descriptors: 4027
Reserved number of file descriptors: 100
Store Disk files open: 0
Internal Data Structures:
49856 StoreEntries
1421 StoreEntries with MemObjects
1420 Hot Object Cache Items
49829 on-disk objects
# mgr:storedir:
Store Directory Statistics:
Store Entries : 49863
Maximum Swap Size : 5120000 KB
Current Store Swap Size: 3949940.00 KB
Current Capacity : 77.15% used, 22.85% free
Store Directory #0 (ufs): /var/cache/squid
FS Block Size 4096 Bytes
First level subdirectories: 16
Second level subdirectories: 256
Maximum Size: 5120000 KB
Current Size: 3949940.00 KB
Percent Used: 77.15%
Filemap bits in use: 49835 of 262144 (19%)
Filesystem Space in use: 16453040/41153856 KB (40%)
Filesystem Inodes in use: 441511/2621440 (17%)
Flags: SELECTED
Removal policy: lru
LRU reference age: 12.80 days
-towo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20180423/9669e897/attachment.sig>
More information about the squid-users
mailing list