November 25, 2024, 06:34:10 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Squid is not caching!!! Please help  (Read 6923 times)

Offline sudheshpn

  • New Member
  • Posts: 3
Squid is not caching!!! Please help
« on: September 25, 2008, 02:29:38 PM »
hi all,
I just installed and configured squid 2.6 on my machine.
Now my squid server is having a ip 192.168.142.80 and I have pointed my browser to the proxy on port 8080.

But when I access any web page the access.log always report a TCP_MISS !!!! Even if I just do a refresh of any page ?!?

1220897463.614 6354 192.168.1.4 TCP_MISS/200 3321 GET http://www.google.co.in/ - DIRECT/209.85.153.104 text/html

1220897495.829 964 192.168.1.4 TCP_MISS/200 7509 GET http://www.google.co.in/search? - DIRECT/209.85.153.104 text/html

1220897531.429 794 192.168.1.4 TCP_MISS/200 3319 GET http://www.google.co.in/ - DIRECT/209.85.153.104 text/html

i have a /cache partition and i have changed my cache_dir to /cache.
[root@squid-cgi cache]# ls -l /cache/
total 88
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 00
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 01
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 02
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 03
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 04
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 05
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 06
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 07
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 08
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 09
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 0A
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 0B
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 0C
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 0D
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 0E
drwxr-x--- 258 squid squid  4096 Sep 24 18:10 0F
drwx------   2 squid squid 16384 Sep 24 17:23 lost+found
-rw-r-----   1 squid squid  5472 Sep 25 19:53 swap.state

my cache.log
2008/09/25 19:25:00| Starting Squid Cache version 2.6.STABLE6 for i686-redhat-linux-gnu...
2008/09/25 19:25:00| Process ID 10712
2008/09/25 19:41:45| Shutting down...
2008/09/25 19:41:45| FD 13 Closing ICP connection
2008/09/25 19:41:45| Closing unlinkd pipe on FD 10
2008/09/25 19:41:45| storeDirWriteCleanLogs: Starting...
2008/09/25 19:41:45|   Finished.  Wrote 12 entries.
2008/09/25 19:41:45|   Took 0.0 seconds (45283.0 entries/sec).
CPU Usage: 0.042 seconds = 0.029 user + 0.013 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena:    2508 KB
        Ordinary blocks:         2468 KB      5 blks
        Small blocks:               0 KB      5 blks
        Holding blocks:           376 KB      2 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:      39 KB
        Total in use:            2844 KB 99%
        Total free:                39 KB 1%
2008/09/25 19:41:45| Squid Cache (Version 2.6.STABLE6): Exiting normally.
2008/09/25 19:42:19| Starting Squid Cache version 2.6.STABLE6 for i686-redhat-linux-gnu...
2008/09/25 19:42:19| Process ID 10860
2008/09/25 19:42:19| With 1024 file descriptors available
2008/09/25 19:42:19| Using epoll for the IO loop
2008/09/25 19:42:19| DNS Socket created at 0.0.0.0, port 32778, FD 5
2008/09/25 19:42:19| Adding domain blr.main.cobaltgroup.com from /etc/resolv.conf
2008/09/25 19:42:19| Adding nameserver 192.168.141.51 from /etc/resolv.conf
2008/09/25 19:42:19| Adding nameserver 192.168.141.52 from /etc/resolv.conf
2008/09/25 19:42:19| User-Agent logging is disabled.
2008/09/25 19:42:19| Referer logging is disabled.
2008/09/25 19:41:34| Using Least Load store dir selection
2008/09/25 19:41:34| Set Current Directory to /var/spool/squid
2008/09/25 19:41:34| Loaded Icons.
2008/09/25 19:41:34| Accepting proxy HTTP connections at 0.0.0.0, port 8080, FD 12.
2008/09/25 19:41:34| Accepting ICP messages at 0.0.0.0, port 3130, FD 13.
2008/09/25 19:41:34| WCCP Disabled.
2008/09/25 19:41:34| Ready to serve requests.
2008/09/25 19:41:34| Done reading /cache swaplog (12 entries)
2008/09/25 19:41:34| Finished rebuilding storage from disk.
2008/09/25 19:41:34|        12 Entries scanned
2008/09/25 19:41:34|         0 Invalid entries.
2008/09/25 19:41:34|         0 With invalid flags.
2008/09/25 19:41:34|        12 Objects loaded.
2008/09/25 19:41:34|         0 Objects expired.
2008/09/25 19:41:34|         0 Objects cancelled.
2008/09/25 19:41:34|         0 Duplicate URLs purged.
2008/09/25 19:41:34|         0 Swapfile clashes avoided.
2008/09/25 19:41:34|   Took 0.3 seconds (  41.5 objects/sec).
2008/09/25 19:41:34| Beginning Validation Procedure
2008/09/25 19:41:34|   Completed Validation Procedure
2008/09/25 19:41:34|   Validated 12 Entries
2008/09/25 19:41:34|   store_swap_size = 264k
2008/09/25 19:41:35| storeLateRelease: released 0 objects
2008/09/25 19:41:36| Preparing for shutdown after 0 requests
2008/09/25 19:41:36| Waiting 0 seconds for active connections to finish
2008/09/25 19:41:36| FD 12 Closing HTTP connection
2008/09/25 19:41:36| Shutting down...
2008/09/25 19:41:36| FD 13 Closing ICP connection
2008/09/25 19:41:36| Closing unlinkd pipe on FD 10
2008/09/25 19:41:36| storeDirWriteCleanLogs: Starting...
2008/09/25 19:41:36|   Finished.  Wrote 12 entries.
2008/09/25 19:41:36|   Took 0.0 seconds (42253.5 entries/sec).
CPU Usage: 0.045 seconds = 0.031 user + 0.014 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena:    2508 KB
        Ordinary blocks:         2468 KB      5 blks
        Small blocks:               0 KB      5 blks
        Holding blocks:           376 KB      2 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:      39 KB
        Total in use:            2844 KB 99%
        Total free:                39 KB 1%
2008/09/25 19:41:36| Squid Cache (Version 2.6.STABLE6): Exiting normally.
2008/09/25 19:41:37| Starting Squid Cache version 2.6.STABLE6 for i686-redhat-linux-gnu...
2008/09/25 19:41:37| Process ID 10817
2008/09/25 19:41:37| With 1024 file descriptors available
2008/09/25 19:41:37| Using epoll for the IO loop
2008/09/25 19:41:37| Performing DNS Tests...
2008/09/25 19:41:42| Starting Squid Cache version 2.6.STABLE6 for i686-redhat-linux-gnu...
2008/09/25 19:41:42| Process ID 10819
2008/09/25 19:41:42| With 1024 file descriptors available
2008/09/25 19:41:42| Using epoll for the IO loop
2008/09/25 19:41:42| Performing DNS Tests...
2008/09/25 19:41:42| Successful DNS name lookup tests...
2008/09/25 19:41:42| DNS Socket created at 0.0.0.0, port 32778, FD 5
2008/09/25 19:41:42| Adding domain blr.main.cobaltgroup.com from /etc/resolv.conf
2008/09/25 19:41:42| Adding nameserver 192.168.141.51 from /etc/resolv.conf


Please help me to solve this problem.... Thanks in advance
 

Offline aktiwari4u

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 161
    • http://aktiwari4u.tk/
Re: Squid is not caching!!! Please help
« Reply #1 on: September 27, 2008, 03:36:11 AM »
i think you should deleat and rebuild your cache.you should also increase your cache size.

Offline sudheshpn

  • New Member
  • Posts: 3
Re: Squid is not caching!!! Please help
« Reply #2 on: September 28, 2008, 05:34:09 AM »
can u tel me how to do that...

Offline sudheshpn

  • New Member
  • Posts: 3
Re: Squid is not caching!!! Please help
« Reply #3 on: October 03, 2008, 10:21:18 AM »
i have created a cache_dir /cache which is having 20 gb space and i tried to rebuild the cache still squid is not saving it in the cache..