Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage when a specific log appear #158

Open
wumingwuan opened this issue Jan 4, 2023 · 1 comment · May be fixed by #164
Open

High CPU usage when a specific log appear #158

wumingwuan opened this issue Jan 4, 2023 · 1 comment · May be fixed by #164

Comments

@wumingwuan
Copy link

error-2023-01-03031327Z-82e00bfb-6139-4f2b-959d-3ac743d40669.zip

Our server facing high CPU usage(maybe infinite loop) when a specific log appear.
elmah/api/new-errors?id will pending and never end.

just unzip and put that xml to log folder will reproduce the problem.
elmahcore version : v2.1.2

jafin added a commit to jafin/ElmahCore that referenced this issue Jan 17, 2023
…, appears to relae to issue fixed in StackTraceParser due to "catastrophic backtracking"

- See atifaziz/StackTraceParser#4 for details
@cvocvo
Copy link

cvocvo commented Jun 26, 2023

Also running into this; only a server reboot seems to fix it.

Edit: moving to this for now (has the fix merged in): https://github.com/ElmahCoreEx/ElmahCoreEx
https://www.nuget.org/packages/ElmahCoreEx/

Edit2: That fixed CPU it seems but left a memory leak issue when we went to elmah/api/new-errors?{id}
So our workaround was just to add a URL rewrite rule: (the 200 status code response prevents frontend errors from showing up)

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Abort Requests for /elmah/api/new-errors" stopProcessing="true">
          <match url="^elmah/api/new-errors$" />
          <conditions>
            <add input="{QUERY_STRING}" pattern="^id=" />
          </conditions>
          <action type="CustomResponse" statusCode="200" subStatusCode="0" statusReason="OK" statusDescription="OK" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

Edit3: ElmahCoreEx/ElmahCoreEx#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants