Disk usage very high


#1

Been having some high disk issues. Ran the git prune; git gc command and still at high usage. Very little files too. This is my advertising land project.


#2

Hey @Fyrlex as you noted your project was very high in disk usage. When disk usage is so high the git gc operation can fail because there’s not enough free space to complete it. I’ve increased the disk allotment for your project for 24 hours so you have enough space to perform the garbage collection.

I notice that you don’t have a gitignore file in this project; it seems likely that your git repo is growing because you have files that change often and cause frequent commits to the repo. If you ignore any files that change regularly it should help with this problem.

Hope this helps!


#3

Thanks, it’s all good now, but I’m getting errors the express package can’t be found. Made 0 changes to anything.


#4

You might try running enable-pnpm in the console to trigger a reinstall and watch the logs for errors. The error you’re seeing might just be the first error Node hits after an unsuccessful install, and forcing an install might either a) end of with a successful install because the previous one failed due to some temporary problem in your container or b) let you know where the real problem is.


#5

Still saying can’t find express after running enable-pnpm


#6

Ah, based on the errors I see when running enable-pnpm on a remix, my guess is that something changed somewhere in your dependency tree and pnpm has cached an invalid set of dependencies. In your console try running rm shrinkwrap.yaml followed by another enable-pnpm and you should get a totally new install with a fresh shrinkwrap.yaml file and hopefully that will resolve things.


#7

Thanks! It all works now!


#8

Hmm, got the same errors on another project. I did the same thing on that project as I did on this one but it still doesn’t work. Project name: hytime-bot


#9

@Fyrlex this looks like the same issue - you don’t have a gitignore file,. so there are some files that are changing frequently and filling up your disk space with git commits. To avoid this in the future make sure you create a gitignore before you encounter disk space issues.

I’ve raised your project’s disk limit for 24 hours to allow you to address it here.


#10

Starts happening again. Because of the too high disk space I can’t even create the file.


#11

Hi @Fyrlex. Like cori mentioned a couple times, the problem with disk space is happening because you don’t have a file called .gitignore. (the . at the start of the file name is important). If you have files that are large and changing very frequently (your database files, for example), those will create large git commits every time they change.

.gitignore tells git - hey, you don’t need to watch these ones any more. In a project like yours, I’d expect to see the data/ directory listed in the .gitignore file.

By the way, Glitch automatically tells git to ignore files in the .data/ directory. If you rename all your folders that are data/ to .data/ (again with that dot at the beginning), those files should start getting ignored. Then you can run git prune; git gc again to clean up the git history which is taking up all your disk space.

All that make sense?