Skip to content

Uncached expression compilation causes application freeze? #719

@rhegner

Description

@rhegner

For a while now we've been seeing occasional freezes in our ASP.NET Core 9 application in producation.

First we suspected some deadlocking issue (see #717 and #716). However, that was the wrong track.

Investigating in other directions I found that whenever the application freezes, we're seeing this:

Image

Long story short: it looks like dynamic expressions are created faster than they can be finalized, ultimately leading to a complete freeze of the server.

Taking a memory snapshot on my dev machine and searching for "dynamic" types implies that NPoco is heavily using dynamic methods:

Image

Questions:

  1. Have you seen similar effects (freezing of the application) that could potentially be caused by NPoco?
  2. Does NPoco cache its dynamically generated methods? If not, that could explain our freeze when new dynamic methods are generated at a high rate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions