nyan icon indicating copy to clipboard operation
nyan copied to clipboard

Docker container size

Open PlusninAlexander opened this issue 1 year ago • 7 comments

Good day. I installed a Nyan-bot, after some time the docker container grew to a size of about 50 gigs (this is also written in the requirements) and will probably continue to grow.

Is it possible to somehow limit the disk used? Maybe there is some option in the configs, or something similar?

I also considered the option of stopping the Nyan-bot, deleting the docker container and starting the bot again. How will this option affect the bot's performance? Is it like a reset to the initial state? What do you say, what advice do you give?

PlusninAlexander avatar Sep 07 '23 08:09 PlusninAlexander

Hello. I am also a user of this script. For nearly a month of work, database size has grown only to 1.7GB:

# du -hs nyan/mongo/
1.7G	nyan/mongo/

What is the size of your database and for how many months has it been running?

As of archiving the data, I have also asked about this in the neighbour opened issue and as the author have mentioned, you can use archive.sh for this.

b0tm1nd avatar Sep 15 '23 12:09 b0tm1nd

Привет. Я тоже являюсь пользователем этого скрипта. За почти месяц работы размер базы вырос всего до 1,7Гб:

# du -hs nyan/mongo/
1.7G	nyan/mongo/

Каков размер вашей базы данных и сколько месяцев она работает?

Что касается архивирования данных, я также спрашивал об этом в соседнем открытом выпуске , и, как упомянул автор , для этого вы можете использовать archive.sh .

It was about 40 GB Less than a month

PlusninAlexander avatar Sep 15 '23 12:09 PlusninAlexander

I suggest you to use du command to examine which directory exactly occupies most of the space. Maybe it's some error logs and not the actual database.

b0tm1nd avatar Sep 15 '23 12:09 b0tm1nd

I suggest you to use du command to examine which directory exactly occupies most of the space. Maybe it's some error logs and not the actual database.

I was talking about the docker container, not the database :)

PlusninAlexander avatar Sep 15 '23 12:09 PlusninAlexander

By following the official installation guide, mongo database is being running under a docker container and no other parts of the script.

b0tm1nd avatar Sep 15 '23 12:09 b0tm1nd

In my case /data/mongo is 17GB for all the time the system is running. The container is indeed 35GB, which is unexpected, but it doesn't grow.

NyanNyanovich avatar Sep 15 '23 23:09 NyanNyanovich

In my case the contained has grown to occupy all of the available space because of the log file: /var/lib/docker/containers/CONTAINER_ID/CONTAINER_ID-json.log I have found here various solutions: https://stackoverflow.com/questions/31829587/docker-container-logs-taking-all-my-disk-space

b0tm1nd avatar Oct 31 '23 17:10 b0tm1nd