Keeps reconnecting upon changes


#1

I’m making a discord bot on glitch.com. The first thing is that it keeps reconnecting when I make changes. I don’t have a lot of storage left. I’ve tried git prune and git gc but when I do git gc it says no space left on device. Failed to run reflog.

SyntaxError: /app/xp.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.Module._extensions…json (module.js:672:27)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
Jump to
at Object.<anonymous> (/app/index.js:23:10)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)

My discord bot is not online and I have uptime robot.

I also have nothing in my xp.json because it keeps reconnecting and I cannot do anything about that.


#2

Hi @Frocalo, welcome to the Glitch Forums!

You can control which files cause your project to restart by using a watch.json file. You can read about it in our help docs, which also points you to a sample project that has a watch.json file you can reference.

As far as your git and disk space issues, if you can share your project name we can take a closer look.


#3

It’s called malaria. I removed .json files from watch.json and my project is live. But my disk stopped.


#4

Ok, I’ve removed the disk space limitation from your project temporarily (for 24 hours) - you should now be able to run the git operations you were having trouble with to clean things up a bit. Keep in mind, though, that if you have files that change often but that aren’t in your .gitignore file, your repo will continue to grow and you’ll end up right back where you are.

Let us know if you need more assistance. Happy Glitching!


#5

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

This is what happened when I tried to run git gc. And the error is the same but for another file. And it keeps reconnecting.


#6

Hey @Frocalo, sorry for the continued inconvenience - my initial attempt at temporarily resizing your disk so you had some space to work with failed; I needed to jump through some extra hoops.

You should be all set to do your cleanup now, thanks for your patience!