You are hereForums / Bugs / Cache directory has exceeded the maximum size allowed?

Version 1.9.9 is out. We have added support for Youtube mobile videos, Facebook, AOL and MySpace videos as well. Fixed caching issues for some already supported websites. Options to control cache directory selection algorithm, bandwidth usage by videocache, etc. More robust videocache scheduler with a lot more options and features. Have a look at changelog for more details. If you have purchased Videocache in last one year, Contact Us to claim your free upgrade. Please mention the email address using which you purchased Videocache. New users proceed to Pricing Page right now, secure your copy and enjoy caching :-) Also, check our new and simplified upgrade policy :-)

Cache directory has exceeded the maximum size allowed?


6 replies [Last post]
Anonymous
Cache directory has exceeded the maximum size allowed?
Printer-friendly versionSend to friend

Working with 1.9.2 here, and I get this error in my videocache.log:

2009-09-04 12:53:12,208 12998 x.x.x.x 64c80ffd1e206275 SCHEDULED YOUTUBE Video scheduled for download.
2009-09-04 12:53:12,209 13103 x.x.x.x 64c80ffd1e206275 CACHE_FULL YOUTUBE Cache directory '/var/spool/videocache/' has exceeded the maximum size allowed.

So I check,

[root@proxy ~]# du -sh /var/spool/videocache/
164M /var/spool/videocache/
[root@proxy ~]# cat /etc/videocache.conf | grep ^base_dir
base_dir = /var/spool/videocache/:65536

What am I missing here? It seems that videocache should be allowed to dump ~65G of videos into /var/spool/cache before I receive an error message like the one I am seeing.

Offline
Joined: Sep 4 2009

I am the OP. I should also note that /var/spool/videocache/ is actually a symlink to /var/spool/squid/videocache/ which a df reports has 803G free.

admin's picture
Online
Joined: Nov 2 2008

jfiske,

This may be problem due to the symlink. Can you try specifying /var/spool/squid/videocache/ as your cache_dir?

Offline
Joined: Sep 4 2009

I updated to /var/spool/squid/videocache/, restarted squid ... same problem :-/

Any other ideas?

admin's picture
Online
Joined: Nov 2 2008

jfiske,

Please apply the following patch to your /usr/share/videoacache/videocache.py and restart squid.

diff --git a/videocache/videocache.py b/videocache/videocache.py
index 2806773..4df42bb 100755
--- a/videocache/videocache.py
+++ b/videocache/videocache.py
@@ -413,14 +413,8 @@ def download_from_source(args):
         disk_stat = os.statvfs(cache_dir)
         disk_available = disk_stat[statvfs.F_BSIZE] * disk_stat[statvfs.F_BAVAIL] / (1024*1024.0)
         video_id_pool = ServerProxy('http://' + rpc_host + ':' + str(rpc_port))
-        # If cache_size is not 0 and the cache directory size is more than cache_size, we are done with this cache directory.
-        #if cache_size != 0 and video_id_pool.get_cache_dir_size(base_tup[0]) >= cache_size:
-        if cache_size != 0:
-            log(format%(pid, client, video_id, 'CACHE_FULL', type, 'Cache directory \'' + base_tup[0] + '\' has exceeded the maximum size allowed.'))
-            # Check next cache directory
-            continue
         # If disk availability reached disk_avail_threshold, then we can't use this cache anymore.
-        elif disk_available < disk_avail_threshold:
+        if disk_available < disk_avail_threshold:
             log(format%(pid, client, video_id, 'CACHE_FULL', type, 'Cache directory \'' + base_tup[0] + '\' has reached the disk availability threshold.'))
             # Check next cache directory
             continue

Thank You!

Everton (not verified)

I had the same problem before applying the patch. After that, the msg disappeared, but the cache directory continues grow, even with the size set at base_dir. I notice that they don’t change to the second cache directory too.

Here is my base_dir configuration:
base_dir = /var/spool/videocache/:32768|/var/spool/videocache2/:32768

Ted
Offline
Joined: Feb 7 2010

how to apply this patch ???

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <code>
  • Lines and paragraphs break automatically.
  • HTML tags will be transformed to conform to HTML standards.

More information about formatting options

CAPTCHA
Are you a human visitor ?
Image CAPTCHA
Enter the characters (without spaces) shown in the image.

My Book on Squid

Purchase/Renew

One License - USD $399
One License - USD $349*
Validity - One Year
Need more? Contact Us
*Includes free upgrades and support for one year.



For details, check pricing.

Recent comments

Who's online

There are currently 2 users and 143 guests online.