How can I stop my Azure App Services from randomly restarting?

0
9
Asked By CoolCat123 On

I'm currently managing several Azure App Services that maintain long-lived WebSocket connections. Lately, I've noticed that these services restart unexpectedly, which I suspect might be due to Azure's container updates. I found that setting CI_DOCKER_ENABLED to false helps reduce the frequency of these restarts, but they still happen on occasion, which is frustrating. Is there a way to prevent Azure from interfering with my container setup and these random restarts?

5 Answers

Answered By SignalMaster88 On

It's essential to prepare for the possibility of disconnections and restarts. Your application should ideally detect these events and quickly attempt to reconnect. This is particularly crucial for services where downtime can impact users, like trading.

Answered By TechGuru22 On

Unfortunately, you can't completely avoid restarts. The more premium workload profiles allow you to set a maintenance window, which might help manage when restarts occur. That's your best shot at minimizing disruptions.

Answered By WebSocketWarrior On

You can't fully prevent the restarts, but timing them with a maintenance window can help. You should also keep in mind that hardware failures will still happen regardless. Consider making your application more resilient to these kinds of issues.

Answered By NetworkNerd101 On

Are you using heartbeats to keep your WebSocket connections alive? In my experience with container app environments, we have several long-lived connections, and we rarely encounter restarts.

Answered By DevNinja77 On

Have you checked if something like an out-of-memory (OOM) issue is triggering the restarts? It's also possible that Azure is maintaining the underlying hosts. Since you're using a managed service, some control is out of your hands. The best practice is to design your app to be stateless or switch to a platform where you have more control.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.