Article
· Oct 13, 2023 1m read

Running containers on ECS Fargate with large files

For containers in ECS files are not editable if the file size is larger than ephemeral storage free space. For example if I have 4Gb free I can't edit 8Gb file. But if I start container with 50 Gb of ephemeral storage (24Gb free) I can edit my 8Gb file just fine. Even file attributes cannot be changed: chattr -i <file> fails if the amount of free ephemeral storage is not enough (and so db can't be mounted for writing).

 

This can cause iris container failure on startup if large DB is both RW and mounted on start. Possibly it can cause container to fail during runtime if the DB grows above a threshold set by available space.

To resolve the issue:

  • Make large DBs readonly
  • Allocate enough ephemeral storage

This likely applies to EKS Fargate, but I have not checked.

Discussion (0)1
Log in or sign up to continue