Hi @Dave Rushton ,
Apologies for the delayed response. It's difficult to ascertain the root cause without additional information regarding the environment. But here are some mitigation steps you can take for the future.
- Utilize the
WEBSITES_PORT
application setting and inject that value as an environment variable into your application. - Enable Always On on the app service. This will ensure your application never has to warm up and rebind the port to forwarding requests.
- Node on Windows will utilize iisnode for hosting your app in Windows. I would advise switching to a Linux environment; not saying that iisnode is the issue but it's one less thing to worry about when hosting your app
Since you stated everything was working fine, it could be a transient issue. However, one thing to compare the app service environment version between the ones that are failing and the ones that are successfully running. If there's a correlation, comment down below and I'll take a closer look.