0

I am having a nodejs application which needs to be keep on running.The application is deployed in azure.But it does not getting started.When i tried to run the app by typing"node app.js" via kudu console it works fine.But as soon as deployed its not working.Package.json file has the script start script.What might be the reason.

 "main": "app.js",
  "scripts": {
    "start": "node app.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },

kudu console link of azure.

https://appname.scm.azurewebsites.net/DebugConsole

1 Answers1

-1

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

  • Node.exe is not present at the correct location. Check nodeProcessCommandLine setting.
  • 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.
  • Web.config configuration is not correct – check the settings names/values.
  • 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.

For more details, refer to Best practices and troubleshooting guide for node applications on Azure Web Apps

You can also check Azure webapp node.js app not starting