Azure Container App unexpected restarts at irregular intervals

David Drápela 75 Reputation points
2023-08-24T10:54:03.64+00:00

Hi, I have a problem with occasional and unexpected restarts of my ACA app at irregular intervals.

I have deployed my dockerized app to Azure as Azure Container App. It is just a single container with no scaling. It exposes two TCP, non HTTP ports to public (using new additionalPortSettings) and it mostly works just fine. One of the ports is used for communication with devices and the other for desktop client connection using proprietary protocol. It also exposes an HTTP port internally for probe checks (in the future the desktop client app will be replaced by a web app).

However, I have noticed that the app occasionaly restarts by itself with no apparent reason. I have enabled Log Analytics and in system logs I can see the following messages:

User's image

The app was restarted at 08:31:27. The app log does not contain any error. Just that it was gracefully stopped at the time of the first error message and then it was started again. There was no error message before it received the stop command, just normal probes communication.

I am a bit clueless at this stage. The restarts happen at irregular intervals - once in a day or even a few days.

The downtime in this case was about one minute but even that can cause issues because the app communicates with devices and desktop client app.

Thanks for any help.

Best regards,

David

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
415 questions
{count} votes

Accepted answer
  1. navba-MSFT 24,165 Reputation points Microsoft Employee
    2023-09-06T02:57:35.2533333+00:00

    @David Drápela I appreciate your patience on this. Thanks for sharing the details over email.

    The Microsoft Azure Team has investigated the issue in which you may have experienced unexpected application restart on your Azure Container Apps.

    Upon investigation, engineers determined that the restart is caused by os image version upgrade. During upgrade, Azure Container Apps will first reschedule customer (Your) applications to a new created node then stop the existing one. Upon deeper investigation, we found we stop the existing application before the new created one is up and ready.

    We are continuously taking steps to improve the Azure Container Apps service and our processes to ensure such incidents do not occur in the future, and in this case it includes (but is not limited to):

    Improve container apps schedule logic, increase the availability 
    Improve alerting and detection for platform os upgrade.

     
    We apologize for any inconvenience.
     
    Regards,
    The Microsoft Azure Team

    **
    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.