LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-06-2007, 09:22 PM   #1
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Rep: Reputation: 15
clearing squid cache not working


hi guys,

my squid cache is 50% used and i tried clearing it with this commamds but all to no avail.

This are the steps i took

1. squid -k shutdown

2. echo "" > /cache1/swap.state
echo "" > /cache2/swap.state
echo "" > /cache3/swap.state

3. squid -z

4. service squid start

but to my greatest surprise after doing all these and i checked the cache partition it was still the same 50% used.

pls i need help here. what am i doing wrong

Last edited by yawe_frek; 05-06-2007 at 09:30 PM.
 
Old 05-07-2007, 07:23 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
why do you need to? it's there as a cache, it's *meant* to be as full as possible...

service squid stop
squid -z
service squid start
 
Old 05-07-2007, 01:50 PM   #3
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
hi friend,
Thanks for ur response,from my personnel experience when the cache partition get fulled to 100% my machanies on the lan stop browsing until the cache is cleared.

Last edited by yawe_frek; 05-07-2007 at 01:53 PM.
 
Old 05-07-2007, 02:15 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
well you're clearly running your caches incorrectly. that sort of behaviour implies they are configured totally wrongly.. why are you even running them if you're happy to nuke your cache constantly??
 
Old 05-07-2007, 08:00 PM   #5
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
Actually we provide internet services to corporate bodies and home users that is main reason for using the squid {cache} and a caching name server basically to reduce the lookup overhead and subsequent queries and also reduce bandwidth usage.Usually i have been using webmin to clear the cache and this has been working fine for me until recently when i decided to do it from the CLI.
 
Old 05-08-2007, 01:45 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
you get paid to run caches set up like that?? wow... seriosuly if this is your trade, you need to get to the root cause not live in a world of workarounds and crude hacks.
 
Old 05-08-2007, 05:19 AM   #7
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
emmm. amasing, i guess u must have known me from somewere that is why seem to be cracking me down, all i need is assistance and if you cant render that then let it be ok. After all we all start from somewere.

if you feel you are so good in using squid then put me through the proper way if you think i am using it wrongly.

Thanks in Advance.

Last edited by yawe_frek; 05-08-2007 at 05:21 AM.
 
Old 05-08-2007, 06:16 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
i'm not crakcing down, i'm simply saying that if this is a commercial venture you are undertaking then you need to take the responsibiltiy and initiative to learn to do things properly. if a full cache is causing you problems then you need to actually investigate it. check the squid access and error logs, check free disk space etc... if your customers are paying for this as a working solution, i wouoldn't expect them to hang around paying you money for long. and also surely this is a hassle? this makes your life harder having to work around this stuff right?
 
Old 05-08-2007, 06:29 AM   #9
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
i seem to be more confused at what you are saying, are you saying that squid cache should not be clear. pls make this clear to me.

secondly what should i watch out for in the access and error log

let i forget to tell you i am not been paid for this i am only doing this cos i love Linux and i want to be more granded in it services and networking applications.

Thanks for your Assistance.
 
Old 05-08-2007, 06:31 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
the squid cache should *never* be cleared otherwise it's pointless running it in the first place. it should have a content managment policy whereby if the alloted amount of diskspace is used up, the oldest unused cached items woudl be pushed out to make space for newer data.
 
Old 05-08-2007, 07:53 AM   #11
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
if i may ask are you using squid, and if you are where is ur cache dir.

send me the config file of ur sqiud

Thanks
 
Old 05-08-2007, 08:42 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
you need to actually read up on squid. someone elses config file is going to be fairly useless.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
clearing cache on squid proxy shadowsurfer Linux - Newbie 9 04-15-2008 11:33 PM
clearing CD cache grayFalcon Programming 1 09-21-2006 04:55 PM
Squid stops working..-->clear rebuild cache ALInux Linux - Networking 8 07-07-2006 10:27 AM
clearing cache, web cache on linux varunbihani Linux - General 2 12-08-2005 12:02 PM
clearing cache waxiem Linux - General 1 03-02-2003 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration