# Directory /var/discourse space is 70G?

**URL:** https://meta.discourse.org/t/directory-var-discourse-space-is-70g/324737
**Category:** Self-hosting
**Created:** [September 3, 2024, 5:48pm UTC](https://meta.discourse.org/t/directory-var-discourse-space-is-70g/324737 "2024-09-03T17:48:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nwnuyhs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nwnuyhs/32/444904_2.png) [@nwnuyhs](https://meta.discourse.org/u/nwnuyhs)
#### Post date: [September 3, 2024, 5:48pm UTC](https://meta.discourse.org/t/directory-var-discourse-space-is-70g/324737/1 "2024-09-03T17:48:57Z")

</div>

My website is a new website ,and users less than 200, and the VPS ROM is 90G,but today ,my websiete`502 Bad Gateway nginx`  
afternoon I received an email：

> The download\_remote\_images\_to\_local setting is disabled because the disk space limit of download\_remote\_images\_threshold is reached.

finaly I find its because no enough space，here are some information：

```plaintext
root@kehan:/var/discourse# ./launcher rebuild app
x86_64 arch detected.
You have less than 5GB of free space on the disk where /var/lib/docker is located. You will need more space to continue
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 88G 84G 0 100% /

Would you like to attempt to recover space by cleaning docker images and containers in the system? (y/N)y
If the cleanup was successful, you may try again now
root@kehan:/var/discourse# ./launcher rebuild app
x86_64 arch detected.

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

2.0.20240825-0027: Pulling from discourse/base
Digest: sha256:6de68cb49198b5281f79ed9401b3fe818c854d220dcf0238549fe2f2adb19146
Status: Downloaded newer image for discourse/base:2.0.20240825-0027
docker.io/discourse/base:2.0.20240825-0027
You have less than 5GB of free space on the disk where /var/lib/docker is located. You will need more space to continue
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 88G 84G 0 100% /

Would you like to attempt to recover space by cleaning docker images and containers in the system? (y/N)y
If the cleanup was successful, you may try again now

```

```plaintext
root@kehan:/var/discourse# du -sh /* | sort -h
du: cannot access '/proc/8758/task/8758/fd/4': No such file or directory
du: cannot access '/proc/8758/task/8758/fdinfo/4': No such file or directory
du: cannot access '/proc/8758/fd/3': No such file or directory
du: cannot access '/proc/8758/fdinfo/3': No such file or directory
0	/bin
0	/dev
0	/initrd.img
0	/initrd.img.old
0	/lib
0	/lib32
0	/lib64
0	/libx32
0	/proc
0	/sbin
0	/sys
0	/vmlinuz
0	/vmlinuz.old
4.0K	/home
4.0K	/mnt
4.0K	/srv
8.0K	/media
16K	/lost+found
16K	/opt
36K	/tmp
48K	/root
568K	/run
3.8M	/etc
56M	/boot
1.4G	/usr
2.1G	/swapfile
87G	/var
root@kehan:/var/discourse# du -sh /var/* | sort -h
0	/var/lock
0	/var/run
4.0K	/var/local
4.0K	/var/mail
4.0K	/var/opt
12K	/var/spool
20K	/var/tmp
408K	/var/backups
114M	/var/log
290M	/var/cache
17G	/var/lib
70G	/var/discourse

```

```plaintext
root@kehan:/var/discourse# du -sh /var/discourse/* | sort -h
4.0K	/var/discourse/bin
4.0K	/var/discourse/cids
4.0K	/var/discourse/LICENSE
8.0K	/var/discourse/scripts
12K	/var/discourse/discourse-doctor
12K	/var/discourse/README.md
20K	/var/discourse/containers
24K	/var/discourse/launcher
24K	/var/discourse/tests
28K	/var/discourse/discourse-setup
32K	/var/discourse/samples
180K	/var/discourse/launcher_go
180K	/var/discourse/templates
232K	/var/discourse/image
70G	/var/discourse/shared
root@kehan:/var/discourse# ^C
root@kehan:/var/discourse# du -sh /var/discourse/shared/* | sort -h
70G	/var/discourse/shared/standalone
root@kehan:/var/discourse# du -sh /var/discourse/shared/standalone
70G	/var/discourse/shared/standalone
root@kehan:/var/discourse# cd /var/discourse/shared/standalone
du -sh *
5.8M	backups
1.8M	letsencrypt
70G	log
4.0K	postgres_backup
110M	postgres_data
180K	postgres_run
11M	redis_data
20K	ssl
28K	state
12K	tmp
11M	uploads

```

My website may have been DDOSed this afternoon. Could these log files be DDOS logs?  
Can anyone tell me how to sove the problem？

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [September 3, 2024, 6:01pm UTC](https://meta.discourse.org/t/directory-var-discourse-space-is-70g/324737/2 "2024-09-03T18:01:28Z")

</div>

You can try `./launcher cleanup` but I don’t understand why it would help. It will delete old and unused containers and images, that will eat up all the space at some point AFAIK, but yours is new one. But it doesn’t cost anything to try.

To be on safe side don’t stop your now-in-use container, because then it will be saved — if it is started after your rebuilding try.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [September 3, 2024, 6:26pm UTC](https://meta.discourse.org/t/directory-var-discourse-space-is-70g/324737/3 "2024-09-03T18:26:54Z")

</div>

Check to see if you have leftover backups here and delete them:  
`/var/discourse/shared/standalone/backups/default`

> [@Local backups not deleted after they are uploaded to Amazon S3](https://meta.discourse.org/t/local-backups-not-deleted-after-they-are-uploaded-to-amazon-s3/247371):
>
> My backups keep accumulating in /var/discourse/shared/standalone/backups/default even though they are uploaded to Amazon S3. Here’s my Discourse setup: Discourse backups: Backups in the S3 bucket: And the contents of /var/discourse/shared/standalone/backups/default: This has been going on for a long time—I have a monthly reminder in my calendar to delete these leftover files.…

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [September 3, 2024, 6:32pm UTC](https://meta.discourse.org/t/directory-var-discourse-space-is-70g/324737/4 "2024-09-03T18:32:23Z")

</div>

> [@nwnuyhs](#):
>
> Could these log files be DDOS logs?

Yes

Just `rm /var/discourse/shared/standalone/logs/*`
