Service disk: how much a service can write, and adding more
See how much disk a web service or background worker is using, what every service includes, how to add disk in 5 GB steps, and why its files are temporary.
What service disk is
A web service or background worker can write files while it runs: caches, temporary uploads, build leftovers. That space is its service disk. It is temporary. Everything written there is erased when a new version is deployed, and it can be erased at other times too, so never keep data there that you need to keep. Put that in a database or in object storage.
See how much disk a service is using
Open the service and choose Disk. The page shows:
- Disk used - how much the service has written, and when it was measured. Voroa measures every 30 minutes. If the figure is older than two hours, or older than the latest deploy, it is labelled Last measured.
- Disk allowance - the disk included with the service, plus any disk you have added.
A service running several copies shows the total across all its copies.
See which folders are using the space
Knowing a service has written 6 GB does not tell you what wrote it. On the Disk page, under What is using disk, choose Scan. Voroa looks inside the running service and lists the folders using the most space, largest first.
The scan takes a few seconds. It does not restart your service and does not change anything inside it.
Two things to keep in mind when you read the list:
- Each folder includes everything inside it, so a folder and the folder it sits in both appear, with similar sizes. Read down the list until the sizes stop matching - that is where the space actually is.
- If the service is not running there is nothing to look inside, so start it and scan again.
The result stays on the page, so you can come back to it later without scanning again. Scan again whenever you want a fresh answer.
What every service includes
Every web service and background worker includes 5 GB of disk at no extra cost.
Add more disk
On the Disk page, choose Add disk. This opens the service’s plan page, where you can add extra disk in steps of 5 GB (5, 10, 15 GB and so on). You are charged a prorated amount for the rest of the current billing period, and the extra disk is added to your monthly bill from then on at the per-GB price shown on that page, plus GST.
A few rules apply:
- Extra disk can be added only to a service that is already on a paid plan.
- Disk can be increased but not decreased.
- Extra disk appears on your invoice as its own line, Extra disk, separate from the service’s plan.
- Changing the service’s plan does not remove the disk you added.
What happens when a service reaches its limit
The Disk page shows a bar of how much of the allowance a service has used, so this is never a surprise.
- At 80 percent we email you once, so you can act before anything happens. If usage falls back well below that, the warning resets and you are told again next time.
- At 100 percent we email you again. The service keeps running.
- If it is still full a few hours later, we restart the service to clear that space. Everything it had written to disk is cleared with it. Anything in a database or in object storage is untouched.
A restart to clear disk does not deploy new code. The service comes back on exactly the version it was already running. A background worker stops for a few seconds. A web service keeps serving - the new copy takes over only once it is healthy.
This happens at most once a day for a service. If a service fills its disk again straight after a restart, we stop and email you instead, because restarting it again would not help.
To avoid it, add disk or reduce what the service writes.
Keeping disk use low
Most services use far less than 5 GB. The usual cause of a large figure is a cache that is never cleared, for example a framework caching every response from an API it calls. Cache responses for a limited time, or not at all for requests whose address changes on every call, and the disk stays small.