2021-05-28T03:04:23.750475036Z Running hooks in /etc/ca-certificates/update.d...
2021-05-28T03:04:23.763278134Z done.
2021-05-28T03:04:23.792761648Z Updated CA certificates
2021-05-28T03:13:28.810538956Z [41m [30mfail [39m [22m [49m: Middleware[0]
2021-05-28T03:13:28.813422146Z Failed to forward request to application. Encountered a System.Threading.Tasks.TaskCanceledException exception after 300032.701ms with message: The operation was canceled.. Check application logs to verify the application is properly handling HTTP traffic.
I tried to debug but no help! it works perfectly fine in dev environment.
Thanks for asking question! Seems you've already
enabled logging
. Could you please share more details on app plan you are hosted Windows or Linux, If using docker and more of the log to help you better on this.
Refer to this article for Debug Node.js Web Apps on Azure
debug-node-js-web-apps-on-azure
Access the log stream.
Test the app locally in production mode. App Service runs your Node.js apps in production mode, so you need to make sure that your project works as expected in production mode locally. For example:
Depending on your package.json, different packages may be installed for production mode (dependencies vs. devDependencies).
Certain web frameworks may deploy static files differently in production mode.
Certain web frameworks may use custom startup scripts when running in production mode.
Run your app in App Service in development mode.
For example, in MEAN.js, you can set your app to development mode in runtime by
setting the NODE_ENV app setting.
Let us know if issue remains.
Thanks for sharing screen shot. Below are the findings :
The Applications logs contain an error- Cannot find module '/home/site/wwwroot/dist/index.js'
The Application maybe
missing a Node module
which is causing your app to fail proper startup.
Suggest you to
refer this article
to deploy your app properly.
Further I can see that you are running on Basic SKU Consider running a production application on a Standard, Premium, or Isolated App Service Plan for better performance and isolation. These SKUs are best for production workloads, but there are other SKU options (Free, Shared, Basic) if you are still in testing mode.
Check:
Azure App Service Plan Pricing Information
Also, your webapp is currently configured to run on two instances. Since you have only two instances you can expect a downtime of upto 50% because when the App Service platform is upgraded, the instance on which your web app is hosted will be upgraded. Therefore, your web app process will be restarted and may experience some downtime as each instance is restarted sequentially.
Consider Scaling out to three instances. These instances are in different upgrade domains and hence will not be upgraded at the same time. While one worker instance is getting upgraded the other is still active to serve web requests.
Check:
Scale instance count manually or automatically
Hope this helps. Let us know if issue remains.