https://linen.dev logo
Deployments remain active after stopping them
# help
g
I have deployed a Serenity bot. When I made a new deployment, the older one got marked "stopped" and the new one "running". However, the bot was still responding twice (two instances running). I did
project rm
and
project new
as suggested in other threads, but the bot was still active. I deployed again, still two bots active, the rm+new once more. Now, I have no "running" deployments, but two instances of the bot are online!
I reset the discord token to make them stop for now, but a fix for this issue would be appreciated 😊
a
Hey there, there are changes coming that should fix this at some point but it's currently not ready to roll out yet - the error is related to the Tokio runtime not shutting down correctly for old deployments (link below explains this somewhat better). Thread reference: https://discord.com/channels/803236282088161321/1069285937932140706 Hope this helps
g
Thanks, I knew I had seen this issue somewhere, I just had trouble finding the thread. Are there any issues on GitHub tracking this?
a
Not specifically at the moment I think, I just had a look
g
This is causing more trouble for me now. In my bot, I spawn a separate thread that interacts with my DB in a scheduled loop. Resetting the discord token only crashes the threads that interact with Discord, but that thread is still running. It seems like I have 4 instances running now, which is causing a bit of unintended behaviour 😕
Should I open an issue on GitHub?
a
What happens if you try creating a new discord application/bot altogether from Discord's side?
k
Do they stop if you do a
project rm
->
project new
?
We do have an issues for this: , and while we have some ideas it may be a little while until we get this fixed. I know it's a very annoying bug though, so we'll try to get to it soon
g
No, they remain running as "ghosts" and are shown as stopped and/or crashed like in the screenshot above.
Resetting the discord token makes the Serenity client crash, which ends the thread it is running on, but other spawned threads remain running. The root of the problem is unrelated to discord.
a
Oh I see, I suppose that makes sense if the runtimes aren't shutting down correctly
4 Views