Web App HTTP Error 500

Violet Zeng 30 Reputation points
2023-06-22T22:48:31.0733333+00:00

I deployed my app from github repo. The deployment was successful, but my web browser still shows "This page isn’t working [projectname].azurewebsites.net is currently unable to handle this request. HTTP ERROR 500'. The deployment log was following:

Command: "C:\home\site\deployments\tools\deploy.cmd"
Handling Basic Web Site deployment.
Creating app_offline.htm
KuduSync.NET from: 'C:\local\Temp\zipdeploy\extracted' to: 'C:\home\site\wwwroot'
Copying file: 'app.js'
Copying file: 'package-lock.json'
Copying file: 'package.json'
Copying file: 'README.md'
Copying file: '.github\workflows\main_testviolet.yml'
Copying file: 'node_modules\.package-lock.json'
Copying file: 'public\code.js'
Copying file: 'public\index.html'
Copying file: 'public\style.css'
Deleting app_offline.htm
Finished successfully.
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2023-06-23T00:47:38.58+00:00

    I'd recommend enabling logging service for Azure App Service:

    Enable diagnostics logging for apps in Azure App Service

    https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs

    These logs will be able to give you more insight into what is causing the app to error out.


    If this is helpful please accept answer.

    0 comments No comments

  2. Filipe Borges 80 Reputation points
    2023-06-23T13:45:20.7733333+00:00

    Hey @Violet Zeng

    You can do like @Dillon Silzer recommended
    User's image

    With logging enabled, you can check the log stream to see what problem your app is having.
    Please make sure that "node_modules" is not empty. That is the most common cause of problems.

    You can do this by accessing the KUDU service from the advanced tools menu, (https://learn.microsoft.com/en-us/azure/app-service/resources-kudu) or by accessing the FTP web app

    --please don't forget to "[Accept the answer]" if the reply is helpful--

    0 comments No comments

  3. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-06-29T11:18:11.83+00:00

    @Violet Zeng

    Thanks for reaching here! To add further here-

    If your application is returning 500 Errors when it starts, there could be a few reasons:

    1. Node.exe is not present at the correct location. Check nodeProcessCommandLine setting.
    2. Main script file is not present at the correct location. Check web.config and make sure the name of the main script file in the handlers section matches the main script file.
    3. Web.config configuration is not correct – check the settings names/values.
    4. Cold Start – Your application is taking too long to start. If your application takes longer than (maxNamedPipeConnectionRetry * namedPipeConnectionRetryDelay) / 1000 seconds, iisnode returns a 500 error. Increase the values of these settings to match your application start time to prevent iisnode from timing out and returning the 500 error.

    Refer to this document link for troubleshooting- https://learn.microsoft.com/en-us/azure/app-service/app-service-web-nodejs-best-practices-and-troubleshoot-guide

    Please let us know if issue remains.

    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.