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

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.
  • Search Engines will index and follow ONLY links to allowed domains.

More information about formatting options

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

Buy Now

Videocache Bundle (RPM and tar archive) is available for just $39.99. Secure your copy now by clicking the button below.
For details, check this page.

Recent comments

Spread it

Thank you for spreading the word!

Who's online

There are currently 1 user and 129 guests online.