Disk Space Issue

My Disk Space is almost full, but when I run git prune; git gc in console, I get the following error:

error: couldn't write .git/logs/HEAD: No space left on device
error: couldn't write .git/logs/refs/heads/master: No space left on device
error: failed to run reflog

My project name is kakuhou-surgeon, but it is private so let me know if you need me to invite you. Thank you!

1 Like

Hey @JMGbaum I’ve granted your project additional disk space for ~24 hours to give you the headroom to run the appropriate git commands. It looks like you’re writing to a sqlite file regularly and that’s filling up your git repo, so you may want to add that file to your .gitignore file.

echo 'database.sqlite' >> .gitignore

should do it. Then run your git commands and you should be back within space limits, and your git directory should grow more slowly.

Hope this helps!


Thank you so much! I really appreciate the help!


I’m sorry to bother you, but this happened again @cori.

Hello @JMGbaum,

Can you invite me to your project so I can take a closer look!

Hey @JMGbaum somehow we got our wires crossed on what to put in your .gitignore - you ended up with echo 'database.sqlite' in there, but that line should just read database.sqlite; sorry about that!

I’ve granted you additional space so you can execute the git prune; git gc process again and if you fix up that line in your .gitignore file you should be all set!

1 Like

Alright, thanks again!


Hello there, I’m having the same exact problem, but my project isn’t exactly the same as this, I’m backing up a json file but it hits the limit even though the json file is only 256kb. Here is the project link: https://glitch.com/edit/#!/the-keplerbot?path=bot.js:3087:5

Hey @keplerteddy, if you run du -hd1 in your project’s console you’ll see something like this:

app@the-keplerbot:~ 15:15 
$ du -hd1
1.0K    ./.data
182M    ./.git
1.0K    ./public
1.0K    ./views
5.0K    ./.config
183M    .

That tells you that your .git folder is what’s taking up your space. The post at disk full, gitignore, git prune, git gc should help you go from there to clean that up, which will probably alleviate problems with your backups.

Please let us know if you run into further problems.

Thanks, I’m not sure where to set up the gitignore file as it’s not connected to a github thingy, I’ve tried running git prune and git gc but it says that the space is full.

Hey @keplerteddy the .gitignore file has nothing to do with GitHub; every Glitch project has a git repo behind it. The post I linked to links in turn to a page which describes the gitignore file in more detail - you can create that file at the same level as your package.json file.

I’ve granted you some additional space for 24 hours to deal with the issue - you should be able to run those commands now. If you don’t create the .gitignore file the likelihood is that this problem will just recur.

I’ve already decided to find a different solutions on one of the pages you sent me, I decided to delete the .git file entirely because I have no need for it. And the code is stored in another git repo, so no need for the extra space.

That will work just fine for now, @keplerteddy, but keep in mind that Glitch will recreate the .git folder automatically, so the problem will probably eventually recur.

Alrighty I think I got the gitignore working, I made datas.json file to be ignored, not 100% sure if I did it correctly but it works.

1 Like