a day ago
Hello,
I'm experiencing a significant discrepancy between Railway's Volume Usage metric and the actual files stored on my production volume.
Environment
- Service:
pcu-office-live - Environment:
production - Volume capacity: 500 MB
- Mount path:
/data - Database: SQLite
Current measurements
- Railway Volume Usage: approximately 468 MB / 500 MB (94%)
du -sh /data: approximately 15 MBdf -h /data: approximately 15 MB used, 409 MB available- SQLite database file: approximately 15 MB
- No large WAL or SHM files are present
- SQLite database header indicates rollback journal mode (1, 1)
- Filesystem: ext4, mounted with
discard - Railway Backups tab: "No Backups"
Timeline
On November 7, 2026, at 03:00 JST, Railway reported 41.88 MB of volume usage.
The reported usage subsequently increased in steps, reaching approximately 420 MB on November 11 at 19:00 JST, and approximately 468 MB on November 12.
The application uses SQLite and performs frequent database writes, including session timestamp updates during authenticated requests. However, I have not confirmed whether this explains the discrepancy.
The application is currently running, but the reported volume usage is approaching its 500 MB capacity.
Questions
- Why does Railway report approximately 468 MB when the filesystem reports only 15 MB used?
- Could storage-layer allocation, retained blocks, or delayed space reclamation explain this difference?
- Is the volume actually at risk of running out of writable space, despite the available space reported by
df? - Is there a safe, non-destructive way to diagnose and resolve this discrepancy?
I would prefer to identify the root cause before resizing the volume or changing the application.
Please do not delete, modify, resize, or restore the production volume without my explicit approval.
Thank you for your help.
5 Replies
a day ago
The volume usage figure we show is the storage layer's allocated blocks for the volume, not the size of the files inside it, so it can sit well above what du and df report. We currently read about 470 MB on that volume while your filesystem shows about 15 MB, and since df and du agree with each other, this is not deleted files being held open by your process.
Two things produce the gap. Blocks freed inside ext4 are only handed back once they are discarded, and the volume allocates in 16 KB blocks while ext4 frees in 4 KB blocks, so a partially freed 16 KB block stays allocated. Workloads that rewrite small pieces of a file often, like frequent SQLite updates, are the typical case. The figure settles somewhere above df, not at it, and backups play no part in it.
Your data is intact and nothing is wrong inside the container. Running fstrim from inside the container returns "Operation not permitted", which is expected, and there is no manual reclaim on our side. Volume billing does follow this figure, at $0.15 per GB-month, so the excess is worth roughly $0.07 per month at current levels.
Status changed to Awaiting User Response Railway • 1 day ago
Railway
The volume usage figure we show is the storage layer's allocated blocks for the volume, not the size of the files inside it, so it can sit well above what `du` and `df` report. We currently read about 470 MB on that volume while your filesystem shows about 15 MB, and since `df` and `du` agree with each other, this is not deleted files being held open by your process. Two things produce the gap. Blocks freed inside ext4 are only handed back once they are discarded, and the volume allocates in 16 KB blocks while ext4 frees in 4 KB blocks, so a partially freed 16 KB block stays allocated. Workloads that rewrite small pieces of a file often, like frequent SQLite updates, are the typical case. The figure settles somewhere above `df`, not at it, and backups play no part in it. Your data is intact and nothing is wrong inside the container. Running `fstrim` from inside the container returns "Operation not permitted", which is expected, and there is no manual reclaim on our side. Volume billing does follow this figure, at $0.15 per GB-month, so the excess is worth roughly $0.07 per month at current levels.
a day ago
Thank you for the explanation.
I understand that the discrepancy may be caused by storage-layer block allocation and frequent SQLite updates.
However, my main concern remains unresolved:
If Railway reports 470 MB used out of a 500 MB volume, will database writes fail when the reported usage reaches 500 MB, even though df shows approximately 409 MB available?
Could a human support engineer confirm how the 500 MB limit is enforced and whether there is a safe, non-destructive way to prevent the application from becoming unable to write?
I do not want to modify or delete production data without understanding the risks.
Thank you.
Status changed to Awaiting Railway Response Railway • 1 day ago
a day ago
The 470 MB figure counts the blocks the storage layer has allocated for the volume, not the size of the files inside it, which is why it sits well above what df and du report. With frequent small SQLite writes, it settles above the df figure rather than matching it, and we don't run a manual reclaim to bring it down.
Your data is intact, nothing has been changed on the volume, and none of this requires you to delete or modify production data.
Status changed to Awaiting User Response Railway • 1 day ago
a day ago
Thank you for the explanation.
I understand now why the allocated volume usage is much higher than the actual file sizes.
However, my main concern is still unresolved:
If the allocated volume usage reaches the 500 MB limit, will my application stop being able to write data, even if df -h and du show plenty of free space?
I've already reduced unnecessary SQLite writes in my application, but the allocated usage is still around 475 MB.
Could you please clarify whether reaching this limit will affect the application's ability to write new data?
I would also appreciate knowing whether there is a safe way to address the existing allocation without deleting or replacing production data.
Thank you!
Status changed to Awaiting Railway Response Railway • 1 day ago
a day ago
The 500 MB is the size of the disk your ext4 filesystem sits on, and the usage figure counts which blocks of that same disk have ever been written and not yet handed back. Because it measures the same 500 MB disk, it tops out near capacity rather than going past it. Whether a write succeeds depends on free space inside the filesystem, which is the roughly 409 MB that df reports. Overwriting or reusing blocks that are already counted needs no new space.
On reclaiming the existing allocation, there is no action for you to take and no safe step that requires touching your data. Freed blocks are handed back automatically through the discard mount over time, but the figure settles above what df shows rather than matching it. Running fstrim inside the container is not permitted, we don't run a manual reclaim, and replacing or recreating the volume would not change this. Your data has not been modified.
Status changed to Awaiting User Response Railway • 1 day ago