Sometimes I got many issues related to space in my Magento Cloud, then I clean up logs and database reports and it starts to work again.
How could I measure it?
You just need to run these two commands below to measure the allocated disk and the percentage of usage.
$ magento-cloud db:size -e production
+----------------+-----------------+--------+
| Allocated disk | Estimated usage | % used |
+----------------+-----------------+--------+
| 8.0 GiB | 6.1 GiB | ~ 76% |
+----------------+-----------------+--------+
$ magento-cloud mount:size -e production
+------------+-----------+---------+---------+-----------+--------+
| Mount(s) | Size(s) | Disk | Used | Available | % Used |
+------------+-----------+---------+---------+-----------+--------+
| app/etc | 196 KiB | 7.8 GiB | 3.8 GiB | 4.0 GiB | 48.8% |
| pub/media | 3.4 GiB | | | | |
| pub/static | 4 KiB | | | | |
| var | 355.1 MiB | | | | |
+------------+-----------+---------+---------+-----------+--------+
If you want to improve it, check it at DevDocs - Manage disk space.
I use following:
ssh your_cloud_environment and perfrom
df -h
.
It shows used and available disk space on each of the Filesystems (some of them are shared between the nodes and some are not).