0
votes

After a deploy to our Azure Web App, we are getting 500 timeouts on any request to the service:

500 - The request timed out.

The web server failed to respond within the specified time.

This has come out of the blue and we cannot determine what's causing it. It seems to take around 230s consistently to time out.

I've enabled all the diagnostic logs in the portal:

Azure Logs Settings

But I honestly don't quite know what to look for in the logs. I've scoured through all the files in the following folders but nothing jumps out.

LogFiles

How can I troubleshoot this problem?

1
was it working fine when you tested it locally ? does the service try to fetch any initial data from a db and is that failing may be ?Aravind
Even plain HTML pages have the same problem. This code works in our Azure-hosted DEV environment (which is configured exactly the same).Dave New
Can you share your web app name, either directly or indirectly? This will help us investigate. Thanks!David Ebbo
Also, please include the UTC time of one such failed request.David Ebbo
@DavidEbbo: I have gone the indirect route. The web app is named "davenewzastackoverflow". You will find two other web apps in that same app service... neither are working, but the one named "tran..." will be easiest to troubleshoot because I can give you a direct URI to some static html page (if that even helps). The following URI can be used: tran....azurewebsites.net/docs/default.html. I made a request timing out at around 17:17:15 UTC (after 230s). Thank you!!Dave New

1 Answers

1
votes

The trick to get debug messages is to set stdoutLogFile="D:\home\LogFiles\stdout.log" in your config, instead of the ..\logs path that you had. After changing that, you get an error file under D:\home\LogFiles. Here is the error you get:

Application startup exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: SMTP server password cannot be null or empty. Parameter name: smtpPassword at TransitApi.Infrastructure.Modules.Logging.EmailOutput.EmailLogger..ctor(String recipient, String sender, String smtpUsername, String smtpPassword, String smtpHost, Int32 smtpPort, String environmentName, LogLevel minimumLevel) at TransitApi.Infrastructure.Modules.Logging.EmailOutput.EmailLoggerProvider.CreateLogger(String name) at Microsoft.Extensions.Logging.Logger.AddProvider(ILoggerProvider provider) at Microsoft.Extensions.Logging.LoggerFactory.AddProvider(ILoggerProvider provider) at TransitApi.Api.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)

So some kind of issue setting up the mail server. That causes the process to crash, and that it behaves poorly.

But I highly suggest that you upgrade to Core RC2, as RC1 is quite obsolete.