Got an error while deploying site "Stopping site <site name> because it failed during startup"

Rivas, Mariolys 0 Reputation points
2024-05-08T14:36:32.8+00:00

Hi,

I'm trying to deploy an app using the reflex python library, but after the app compiles successfully, I get the error above. I have tried having the app listen to every port, including 80 and 443, and it doesn't fix the issue.

Thanks.

Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
929 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,270 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Grmacjon-MSFT 17,286 Reputation points
    2024-05-08T23:38:55.94+00:00

    Hi @Rivas, Mariolys we are sorry to hear you're facing this issue.

    The error message "Stopping site <site name> because it failed during startup" means an issue during the startup process of your application deployed on Azure App Service. While you mentioned trying different ports (80 and 443), the problem likely lies elsewhere. Here are some steps to troubleshoot and fix this issue:

    Since you're using the Reflex library, there might be more specific error messages logged during deployment. These logs could be stored in Azure Application Insights or Kudu logs. Access the Azure portal and navigate to your App Service resource. Look for "Application Insights" or "Kudu" to access the logs. These logs might provide clues about the root cause of the startup failure, such as missing dependencies, configuration errors, or exceptions within your Reflex application.

    Also, The issue might be that your site is not starting up within the default time limit of 230 seconds. You can try increasing the startup time by setting the WEBSITES_CONTAINER_START_TIME_LIMIT App Setting to a higher value. The maximum value you can set is 1800 seconds.

    0 comments No comments

  2. 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

  3. Grmacjon-MSFT 17,286 Reputation points
    2024-07-03T21:41:26.2833333+00:00

    Hello @Rivas, Mariolys thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    • You tried to deploy an app using the reflex python library, but after the app compiles successfully, I get the error above.
    • You also tried having the app listen to every port, including 80 and 443, and but you still got this error message "Stopping site <site name> because it failed during startup"

    Solution:

    • You went through Microsoft Support, and they informed you that:

    "it is not possible to deploy a web App developed with reflex UI. The python reflex is suing frontend and backend on the same application has exposing two ports in a docker custom container. As of now, App Service doesn't support exposing more than one port on custom container. So, it is not possible to run the application using custom container.

    An alternative solution would be to use a Virtual Machine service."

    Best,

    Grace

    0 comments No comments