简体   繁体   中英

Aws EC2 instance running out of space without apparent reason

I have an Amazon EC2 instance with two docker containers that gets out of space every 20/25 days.
Filesystem Size Used Avail Use%
/dev/xvda1 50G 40G 10G 80%
Already tried du -hs * | sort -h du -hs * | sort -h in many folders but couldn't find big folders or something like it.
Is there any other way to proceed?

This could be caused by the extensive logging done by the Docker container, if you use the following command:

docker logs [container_id] | wc -l

You will see that the container is filled with logs. Imagine if all of this are stored in memory, of course the EC2's memory will be exhausted too right? Not really because the OS redirects not-so-used memory contents to the machine's swap. You can check if my guess is right using the command below:

grep Swap /proc/meminfo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM