App container failed to start: Container for site has exited, failing site start

Meesala, Bhagya Harika 0 Reputation points
2024-06-06T18:20:47.12+00:00

I'm trying to start/restart the App service from Azure portal, but the URL shows Application Error

Upon diagnostics, it looks like the container is failing site start.

User's image

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,888 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Laziz 190 Reputation points Microsoft Employee
    2024-10-04T19:08:52.8433333+00:00

    Hi Meesala, Bhagya Harika,

    For the latest error you got on "ModuleNotFoundError: No module named 'app'", will you please try the following:

    1. In your Web App, click Deployment -> Deployment Center, then open Logs section to see if there were any deployment failures (very likely, yes).
    2. After that, click Sync button as shown below, wait for its completion and verify that the latest status is Success (Active). If yes, please restart the Web App and test it again. Hopefully, it will resolve the issue.

    User's image

    1 person found this answer helpful.
    0 comments No comments

  2. SnehaAgrawal-MSFT 22,701 Reputation points Moderator
    2024-06-12T05:45:32.6366667+00:00

    @Meesala, Bhagya Harika Thanks for reply!

    ModuleNotFoundError will usually present itself where the module/package you’re importing is missing. Either it was never defined in requirements.txt, deployment was done but package installation was never done to produce site-packages, or the library is there and the package installation was done - but it’s dependent on a native library (.so files) that is not available in the container.

    Ultimately, this will always cause the application/container to crash.

    Suggest you refer the detailed steps mentioned in the link- https://azureossd.github.io/2022/11/24/Python-on-Linux-App-Service-and-ModuleNotFound-Errors/

    0 comments No comments

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.