Restarting the project using console's refresh command spawns another instance of the project

Using the refresh command in console seems to spawn another instance of the project without killing the previous one.
For example, using refresh will result in my discord bots spawning multiple instances. This means that respond multiple times to a command, depending on the amount of refreshes i do.

E.g. If i refreshed the project 3 times,



This is happening to all my projects. I would appreciate if someone can assist me in this.

1 Like

you could do sometype of npm stop script which stops all processes, and then when it refreshes, it restarts the project

add this to your main script

process.title = "P1"

and then this to package.json scripts

"stop": "pkill --signal SIGINT P1"
1 Like

You can also regenerate your token, all current processes will be erratic, so no instance will be launched :upside_down_face:

1 Like

Thank you all for your replies.
However, running the refresh command used to restart the project, not start another new process of it. This means in the past, the process is killed and started again.
My projects have all been working for about a year now, this issue only came up recently and i haven’t touched my projects for quite a while (many months)
Did glitch recently made changes to the way restarts work or something?

doing ps aux should tell you all processes running, if i can get on your projects doing this, i can add an anti-cloning script, and kill all those extra processes

it should look something like this

if you send a screen shot of your processes, i can tell you what to exactly kill.

i am also attempting to replicate your issue, with varying success rn

1 Like

ok, here is the solution, in the console do

killall -u app

that will kill all process, forcing you to refresh the webpage, but should kill all extra processes created so that issue stops

1 Like

It looks like multiple people are having the same issue and that this is not normal

Maybe a glitch support staff can merge these topics together as we work on a permanent solution to this issue.

This doesn’t seem to work, it seems glitch has created a invisible copy of the project with its own console instance and environment, making it impossible to access it. Running killall -u app will restart one instance of the app. However, the other running instances are inaccessible.

odd… i can see tht this is very odd, @jenn @cori are either of you able to restart all apps? force restart?

We have been doing that, but if apps are still encountering this I can manually restart them and see if that works and then investigate further!

1 Like

ok, thank you!

and i started to have this issue aswell…


For those who have bots and that happens, just regenerate the token and it will be

thats what i had to end up doing.

and then it duplicated the processes again