hello, i’ve been testing out glitch for the past couple of days but i ran into a problem with process management. from the logs it looks glitch is killing the process and then starting it again when a code change is detected but it looks like not all pending listeners are cleared (like setIntervals). should i take care of them myself? and how would you recommend doing so? (a listener on sigint? does glitch let the process know when it’s going to do its thing?)
I don’t have answers to your questions. I find this surprising though. Can you talk about what evidence you have that these setIntervals, which should be within the process, survive after the process is killed?
i don’t have logs saved as hard evidence (probably the staff has access to them?) but i had a function which made an http call and it kept running even after i saw new “listening” logs from my http server. i eventually had to unboost and boost the app again in order to kill it.
requesting backup @glitch_support
I’m not sure what is going on here. Let’s see if any other members of the community have help to offer. If you don’t get the help you need, you can send a message to firstname.lastname@example.org so we can investigate your project specifically.
hi @tasha, thanks!
i reached out over twitter dm before opening this topic and just got a response from there as well.
the project in question for those interested
Right on! We got your support request and are still researching the issue. As soon as we have more information for you, we will update the ticket.
In the meantime, I am going to move this question over to the Discord section because there are many experienced coders there who have way more experience working with Discord than we do. They may be able to give you an answer before we follow up with you.
i still think this is about the glitch container setup but as long as you guys are investigating on your end, we’ll be fine
i suspect this might be related to this case here about intervals, too btw.
hi there! here’s a bump with some findings:
i looked into what signals the app was getting by trial & error and only managed to get a chance to clearInterval on SIGTERM.
it’d be great if you can update documentation with a detailed description of the refresh process tho!