Skip to content

Running out of disk space

David Laing edited this page Nov 27, 2013 · 5 revisions

What happens when your app exceeds its disk space quota, but continues to write logs?

As an experiment I started an app whose start script (start-app.sh below) downloaded some large files, and then launched a process that logged lots of data to stdout.

#!/bin/bash
wget http://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-stemcell/aws/bosh-stemcell-1252-aws-xen-ubuntu.tgz 
wget http://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-stemcell/aws/bosh-stemcell-1250-aws-xen-ubuntu.tgz 
wget http://ipv4.download.thinkbroadband.com/50MB.zip
wget http://ipv4.download.thinkbroadband.com/20MB.zip
wget http://ipv4.download.thinkbroadband.com/10MB.zip
mono bin/myapp-worker.exe

at 10:58:57,

$ gcf app exceed-logs-app

     status    since                    cpu    memory          disk            
#0   running   2013-11-27 10:56:38 AM   0.0%   29.6M of 256M   1023.6M of 1G

at 10:59:05 we hit our disk limit, and I expected a crash.

$ gcf app exceed-logs-app

     status    since                    cpu    memory          disk            
#0   running   2013-11-27 10:56:38 AM   0.0%   29.6M of 256M   1G of 1G  

However, $ gcf logs exceed-logs-app continued to stream logs to my console happily

15 min later at 11:16:51, my app was still running happily

$ gcf app exceed-logs-app

     status    since                    cpu    memory          disk            
#0   running   2013-11-27 10:56:38 AM   0.0%   29.6M of 256M   1G of 1G   

The only thing that had happened is that logs/stdout.log had stopped growing once the disk limit was reached.

at 11:19:23


$ gcf files exceed-logs-app logs
Getting files for app exceed-logs-app in org mrdavidlaing-labs / space development as david@davidlaing.com...
OK

env.log                                   1.2K
staging_task.log                          693B
stderr.log                                  0B
stdout.log                                8.2M

at 11:21:33

$ gcf files exceed-logs-app logs
Getting files for app exceed-logs-app in org mrdavidlaing-labs / space development as david@davidlaing.com...
OK

env.log                                   1.2K
staging_task.log                          693B
stderr.log                                  0B
stdout.log                                8.2M

All this time $ gcf logs exceed-logs-app continues to stream new logs happily, although I did find this error message: ... [App/0] ERR tee: /home/vcap/logs/stdout.log: Disk quota exceeded

So, it appears the answer to "what happens when my app fills its disk with logs" is, "logs/stdout.log stops growing"

If your app tries to write to the filesystem, it will get errors similar to Cannot write to '512MB.zip.2' (Disk quota exceeded).

Also long as your app handles this kind of error gracefully, CF will continue to let it run.

Contents

Community Advisory Board, PMC Schedules

Developing CF

Latest CF Releases

Roadmap and Trackers

See CFF official project list.

Roadmaps are reflected in pivotal trackers. Tracker Instructions and steps to watch stories. Here is a flat list of all trackers:

CIs

Maybe other CIs hosted on cf-app.com are mentioned in slack ?

Using CF

Running CF

Tools

Clone this wiki locally