Marius Stănescu
Marius Stănescu

Reputation: 3761

Why does the elmah log return Request timed out on production server?

I have an ASP.NET MVC 4 application with the ELMAH nuGet package installed, hosted on Windows Azure. When i access /elmah on localhost everything works fine, but on the production server i now get Request timed out error. It used to work on the production server too. The last changes I made to the app were removing the MiniProfiler and Glimpse packages and adding the New Relic profiling package and add-on on Windows Azure Website. Elmah still logs all errors (i can see the xml files generated), but I don't know why i cannot view the error log anymore. Any ideas?

Here is the full error message:

Server Error in '/' Application.
Request timed out.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request timed out.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Request timed out.]

And here is the web.config:

    <sectionGroup name="elmah">
      <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
      <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
      <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
      <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
    </sectionGroup>

    ...

   <appSettings>
    <add key="elmah.mvc.disableHandler" value="false" />
    <add key="elmah.mvc.disableHandleErrorFilter" value="false" />
    <add key="elmah.mvc.requiresAuthentication" value="true" />
    <add key="elmah.mvc.allowedRoles" value="admin" />
    <add key="elmah.mvc.route" value="elmah" />
  </appSettings>

   ...

  <system.web>
    <httpModules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
      <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
      <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
    </httpModules>
  </system.web>

    ...

  <system.webServer>
    <modules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
      <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
      <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
    </modules>
  </system.webServer>

...

  <elmah>
    <security allowRemoteAccess="true" />
    <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/elmah" />
  </elmah>

Update: Now i started to get a 502 error

502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

Upvotes: 3

Views: 584

Answers (1)

cdeutsch
cdeutsch

Reputation: 3952

This worked fantastically after FTPing in and manually deleting the Newrelic folder because Azure couldn't do it for me.

uninstall-package NewRelic.Azure.WebSites

Upvotes: 1

Related Questions