Out Of Disk Space

If you are getting errors that you are out of disk space, the usual solution is to remove unwanted files or upgrade your disk space.

df -h

First, make sure you really are out of disk space. If you are, the command above will show 100% usage of the / (root) partition. If the root partition is not fully utilized, then you might be out of inodes.

df -i

This will tell you about your inode usage.

Out of disk space

Each time you deploy your application you are adding another 50M or more of data to your server, depending on the size of your application. Add to this the size of your log files and any data uploaded by your users.

The easiest way to clean up some space is to remove old deployments. Running cap deploy:cleanup is an easy way to do this. By default, your last 2 deployments will remain on the server. You can check or adjust that number in your deploy.rb:

set :keep_releases,2

If you change this, be sure to commit it to subversion before running the cleanup task.

If still you need to free up more room, clean up your log files from /var/www/apps/your_app/shared/logs. You might want to look into Rotating Application Logs to keep them from getting too big.

Out of inodes

It may be you have disk space left but you are using all of the inodes on the filesystem. This can occur if your server or application is creating lots of very small files. The quick solution is to remove some of these files. The longterm solution will be to submit a support request. Your filesystem can be rebuilt with more inodes.

Meta