Random console restarts?


Few weeks ago someone was asking about this among other things and it was kind of acknowledged but not explained nor indicated the issue is being resolved.

In the meantime I noticed my own console app is restarting from time to time for no apparent reason, which makes me think maybe this is container resetting and it has nothing to do with console running or not, but console makes it obvious while to normal web page it would be just a little slowdown.

So what is going on? Are these resets even an issue, or on purpose? Container constantly trying to sleep, sometimes could maybe fail to realize it is actually being used, or similarily some side effect of whatever automated process trying to conserve whichever resources?

For me this is not just an annoying issue, it is complete show-stopper, so any info about it, and how to prevent/avoid it, is welcome.


Is this still on the project that you were asking about in Random container reset, or just console reset?. I’ve had MC open (and idle) in a window on that project for over 10 minutes and haven’t seen any disruptions. I’ve also asked other folks on the team if having an active console window is sufficient to keep a project from going to sleep - do you have an external service pinging a project endpoint to keep it awake (like an UptimeRobot job or the like)? Without such a thing your project will go to sleep after 5 minutes of inactivity (although as I noted I don’t know if actively using a console window counts as “activity” in that sense.

If that’s not the project you’re experiencing trouble with now, can I ask which one is?


Is this still on the project that you were asking about…

Noticed it ther first, but In all of my projects I’m using console a lot, either my own or glitch, and it happens regardless while I am unable to see any pattern to it, although I am fairly confident now it is not related to Midnight Commander. Usually it happens once or twice per hour, but sometime few hours pass without the reset.

I can reproduce it on Android by switching from browser to some other app and returning back after, say, about only 5min. But I am afraid this is not it, I think this is actually expected, just a side efect of how Android frees resources of bacground processes, I guess.

The real issue is due to a different reason I would say as it happens when I am not leaving browser, not even switching to another tab, and constantly typing something or playing some console game.

Specifically, the project I referred to where this issue is critical, is about hosting a console game where random reset could cost some player hours of progress.

…I don’t know if actively using a console window counts as “activity” in that sense.

That’s it, that is the first question this puzzle needs answered. Although, if using console didn’t count as ‘activity’ I should be seeing those restarts every 5 min, but maybe it’s not completely broken and thus triggers only occasionally. I think this is the best place to start investigation.


As i suspected, an open running console window should keep your project running so this probably isn’t related to the standard project sleep cycle (although it would still be helpful to know if you’ve got something external keeping your project awake). It also doesn’t sound like it’s related to the every-12-hours container restart cycle since as I hear what you’re saying it happens multiple times to the same project within a 12-hour period. The restart cycle is important to know for this use-case though - as you note someone playing a console game in this environment might lose a lot of progress due to an unexpected restart, but your project’s container will always stop 12 hours after its most recent start time even with an external keepalive - the keepalive will just start it back up the next time it triggers.

The next thing I think we need to do to try to troubleshoot the random restarts is to track, as closely as possible, the times of unexpected restarts and the project that’s affected. If you can provide that information about one of the projects that’s being affected by the issue, as well as any other details about what’s going on in the project at the time of the restart, we can try to take a look at what the project and its container are doing at that time.

EDIT: I had the container restart period wrong.


it would still be helpful to know if you’ve got something external keeping your project awake

No. I think it’s also not some code of mine that’s causing the trouble as it happens accross multiple different projects, and I believe also with blank new projects.

I don’t currently have other computer but Android tablet, so I kind of dissmised the problem as I can’t properly investigate, and I hoped the issue is Android related. Wich just might be the case, but then I saw that post and it got me worried again:

Console issues (new sessions, lag, lost input)


Over the past few weeks I’ve been working in the console a lot and I’ve noticed a couple persistent issues.

  1. The console session “refreshes” with some frequency. While working, the console window will basically display a completely new session. If you use ps you can see that applications are still running in the background.


In testing this I’ve observed the console refreshes…

Perhaps I’m misreading this, but it seems Simeon is experiencing the same problem, and Gareth sounds like he knows now about it too.

12-hours container restart cycle

Does it at least happen at aproximately the same time?

Here are two console games to test the issue:


it’s 12 hours from the last start of your project’s container, so it’s dependent on that - it’s not at 12:05 every day or anything like that.

I’ll look into the rest and get back to you.


As i suspected, an open running console window should keep your project running

By the way, could you say if this open window/tab has to be in focus for that to work? In other words, on desktop computer, does switching to another browser tab has any impact on this functionality, or switching to another application and then coming back after few and after more than five minutes?


I’ll look into the rest and get back to you.

Please do, and if possible sooner rather than later, since this is critical issue for my console apps I’ll have to get moving elsewhere soon, and I’d rather not.

Or, can someone at least confirm to observe this on desktop platforms, or on OS other than Android. Otherwise, I by myself, would not even know where from to start tackling this issue.

And Gareth, he quite possiblly already has some insight, is he not around anymore?


Hey @pokerica sorry for the delay here; I have observed the “random” console restarts in numerous situations but haven’t been able to narrow anything down or come up with a reliable set of reproduction conditions. I’ve recently put together a few different tools that might help shed light on it; I plan on setting up an environment that might help me capture more details tomorrow.

Gareth is still around but not as active on the forums as he previously was. In this case I believe he just confirmed that he’d also seen the behaviour, not that he had any insights as to its cause.


Thanks, let us know how it goes.