I login ECS:fargate container and try to install a pip library (for testing)
root@ip-172-31-2-132:/# pip install torch
Collecting torch
Downloading torch-1.13.0-cp39-cp39-manylinux1_x86_64.whl (890.2 MB)
━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.1/890.2 MB 55.4 MB/s eta 0:00:13
ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
It shows error.
However, what decide the disk size of fargate?
I cheched disksystem
root@ip-172-31-2-132:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 30787492 30333472 0 100% /
tmpfs 65536 0 65536 0% /dev
shm 3932052 0 3932052 0% /dev/shm
tmpfs 3932052 0 3932052 0% /sys/fs/cgroup
127.0.0.1:/ 9007199254739968 4276224 9007199250463744 1% /usr/src/app/_mat
/dev/nvme1n1 30787492 30333472 0 100% /etc/hosts
/dev/nvme0n1p1 5082764 1843908 3170064 37% /managed-agents/execute-command
tmpfs 3932052 0 3932052 0% /proc/acpi
tmpfs 3932052 0 3932052 0% /sys/firmware
It looks almost all /
are consumed, around 30GB.
then,I checked in /
directory
root@ip-172-31-2-132:/# du -h -d 1
0 ./sys
3.0M ./etc
8.0K ./run
4.0K ./boot
4.0K ./lib64
4.0K ./srv
7.0M ./bin
304M ./tmp
0 ./dev
4.0K ./opt
83M ./root
4.0K ./media
4.0K ./mnt
4.0K ./home
4.2M ./sbin
271M ./var
11G ./usr
22M ./lib
du: cannot access './proc/363/task/363/fd/3': No such file or directory
du: cannot access './proc/363/task/363/fdinfo/3': No such file or directory
du: cannot access './proc/363/fd/4': No such file or directory
du: cannot access './proc/363/fdinfo/4': No such file or directory
0 ./proc
48M ./managed-agents
12G .
only 12G is consumed.
Moreover, I deleted some folders(like cache folder) totally 4GB manually.
and try this again pip install torch
then it shows [Errno 28] No space left on device
again.
Why this happens?
CodePudding user response:
ECS Fargate tasks by default get a total of 20GB ephemeral storage space. If you need more than that you need to modify the task definition to specify a larger storage amount.