Skip to content

Memory leak with database context #394

@thegolddustrush

Description

@thegolddustrush

Not sure if this project is still alive. I have been struggling with memory leaks with this latest version of ninject and Mvc final release (v5). My entity framework context is instantiating over and over again without being disposed. I have put a static class counter for my db context and it runs thousands I can see eventually under heavy user activity it gets sluggish and needs an IIS worker thread recycle. I am using default transient scope. I tried request scope and seems to properly dispose the context as I see the class counter for my db context stays stable but I get services injected with ninject being disposed prematurely when I test with multiple users but it seems to work ok with one user. I use ninject for constructor injection for controllers and services injected into controllers use constructor injection too so I'm expecting it to handle the injection recursively.

Is there any known fixes for these memory leak issues?

Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions