# Troubleshoot disks

For more general information, see how to [troubleshoot development](https://fixed.docs.upsun.com/development/troubleshoot.md).

## Exceeding plan storage limit

Professional plans come with a default amount of storage that you can [change with your plan](https://fixed.docs.upsun.com/administration/pricing.md).
The storage is allocated among your services and applications using the `disk` parameter in their configuration files.

You might accidentally set the sum of all `disk` parameters in the files to exceed your plans storage limit.
For example, by setting `disk: 4096` for a MySQL service in `.platform/services.yaml`
and `disk: 4096` in `.platform.app.yaml` for a plan with a 5 GB storage limit.

In such cases, you get an error like the following:

```text
Error: Resources exceeding plan limit; disk: 8192.00MB > 5120.00MB; try removing a service, or add more storage to your plan
```

To fix the error, do one of the following:

* Lower the `disk` parameters to a value within your plan's storage limits.
  Note the [limits to downsizing disks](https://fixed.docs.upsun.com/create-apps/image-properties/disk.md).
* Increase your plan's storage limits.
  This can only be done by people with the [manage plans permission](https://fixed.docs.upsun.com/administration/users.md#organization-permissions).

## Low disk space or inode exhaustion

[Health notifications](https://fixed.docs.upsun.com/integrations/notifications.md) can alert you to low disk space,
inode exhaustion (a file count limit), or both.

To help identify the cause, you can:

* [Check mount usage](https://fixed.docs.upsun.com/create-apps/troubleshoot-mounts.md#disk-space-issues)
* [Check your database disk space](#check-your-database-disk-space) (if applicable)

Deleting unnecessary files such as temporary files, logs, or build artifacts can free up disk space and inodes.
If you know their origin, consider setting up automated cleanup to prevent recurrence.

If cleanup measures are insufficient, you can [increase the allocated disk space](#increase-allocated-disk-space).

### Check your database disk space

If you receive a low disk space notification, the database might be a contributing factor.

To get an estimate of current database disk usage, run `platform db:size`.
The estimate looks something like this:

```text
+----------------+-----------------+--------+
| Allocated disk | Estimated usage | % used |
+----------------+-----------------+--------+
| 1.0 GiB        | 520.3 MiB       | ~ 51%  |
+----------------+-----------------+--------+
```

Try cleaning up unused data before [increasing the allocated disk space](#increase-allocated-disk-space).

### Increase allocated disk space

If you find that your application or service is running out of disk space, available inodes, or both,
you can increase the available storage.

To increase the space available for applications and services,
use the `disk` keys in your `.platform.app.yaml` and `.platform/services.yaml` files.
The sum of all `disk` keys can't exceed the available storage in your plan.

If you need more storage to fit the sum of all `disk` keys, increase your plan's storage limits.
This can only be done by people with the [manage plans permission](https://fixed.docs.upsun.com/administration/users.md#organization-permissions).

## No space left on device

During the `build` hook, you may see the following error:

```text
W: [Errno 28] No space left on device: ...
```

This is caused by the disk limit on the build container — a temporary environment used to compile
your app before deployment. The resulting image is restricted to 8 GB, no matter how much
writable disk has been allocated for the deployed application.

Some build tools (yarn/npm) store cache for different versions of their modules.
This can cause the build cache to grow over time beyond the maximum.
Try [clearing the build cache](https://fixed.docs.upsun.com/development/troubleshoot.md#clear-the-build-cache) and [triggering a redeploy](https://fixed.docs.upsun.com/development/troubleshoot.md#force-a-redeploy).

If your application requires more than 8 GB during the build phase,
you can open a [support ticket](https://fixed.docs.upsun.com/learn/overview/get-support.md) to have this limit increased.

