Gantry LESS files and Dropbox are eating up my disk space

I’m using a template based on the Gantry framework. There are a few posts like this one complaining about Ganry creating a bunch of gantry_less* files in /tmp and filling  up the disk.

I also use Dropbox to do backups (after properly encrypting the files, of course). Again, it makes a bunch of files in the /tmp directory and eventually fills up disk space.

Rather than trying to diagnose the Dropbox problem (last time I looked, I couldn’t find a solution) or fix the Gantry code, I just delete the old files on a regular basis. This seems to do the trick.

I put the following script in /etc/cron.hourly:

#!/bin/bash
find /tmp/ -daystart -maxdepth 1 -type f -mmin +240  -name "*" -exec rm -rf  {} \;
find /tmp -daystart -maxdepth 1 -mmin +240  -name ".*" -exec rm -rf  {} \;
Advertisements

2 thoughts on “Gantry LESS files and Dropbox are eating up my disk space

  1. I think it’s a permission issue within the site directory. When gantry tries and fails to write a compiled css to its template directory (within the site directory), it uses the tmp directory. It does not, however, seem to be considering previously compiled css from the tmp directory, causing repeated recompilation and thousands of css files. It is most definately a bug in gantry, as it should be reusing previously compiled css in tmp. It is a bug that goes away when permissions are set correctly on the site, however. Provide apache read/write perms to site files. Even with the cron job to remove /tmp/gantry_less*, the site is still regenerating css with each request, so setting correct perms should result in a better performing site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s