-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Memory Leak! #6984
Comments
I am running your project locally to test the behavior on my side, thanks for providing it. |
More questions:
|
Yes, I open 3 browser tabs and see how memory grows.
How best to make a dump? This is a simple example that shows the strange behavior of the server. Production is certainly a more complex project. There's a large dotMemory dump.
|
@aropb could you please answer @sebastienros's first two questions as well? |
Hi, The server becomes unavailable to clients. The Service must be restarted. On the server 6GB is available, the server is virtual. Production server: OS Name: Microsoft Windows Server 2012 R2 Standard Total Physical Memory: 8 191 MB If the memory is all over the log file like this: 2019-01-11 11:40:22.7350 Microsoft.AspNetCore.Server.HttpSys.LogHelper.LogException Error: ListenForNextRequestAsync An operation was attempted on a nonexistent network connection at Microsoft.AspNetCore.Server.HttpSys.MessagePump.ProcessRequestsWorker() ExecutionContext.RunInternal => d__22.MoveNext => LogHelper.LogException Dump of WebServerTest from dotMemory: |
@sebastienros, Do you need some more information? Thanks. |
No, sorry for the delay, I just need more time. Thanks. |
Hi, @sebastienros, when can I expect an answer? Thanks. |
I can't repro an issue. I have published the application you provided with the Does you issue only happen through IIS in-process? |
No, IIS i don't use. |
Please, write your PC and OS specification. |
Windows 10, .NET Core 2.2.1 |
@sebastienros, Hi. Dump: |
It might just be that gen2 GC hasn't triggered yet. Using 60MB of memory is very low, the GC will only start once it hits memory pressure, meaning the OS tells the application that it's about to use too much memory. But I might be wrong. Let it run for hours, take a memory dump (one from the task manager is fine) at the middle of the run and right before your stop it once it's taking half your system memory. Taking two dumps will let us know what objects were created during this window. Take a look at this comment where the process takes more than 2GB and the GC is never actually called, only because it doesn't have to as the available memory is still plenty. It might not be the "expected" scenario from an application developer's perspective though, and this will be changed in .NET 3.0. |
@sebastienros Hi, I found my bug in the controller. I'm sorry. I used in "Select/Where" from DatabaseContext a not static method of a controller. Thanks. |
Hello all,
I found a memory leak in a simple project (.NET Core 2.2.1, OS Windows 10 Pro 1803, Build 17134.523).
Screenshots and project attached.
The problem is very serious, because the production project takes all the memory and falls.
The size of Heap Generation 2 is constantly growing!
gcserver=off kestrel
gcserver=on httpsys
gcserver=off httpsys
WebTest.zip
The text was updated successfully, but these errors were encountered: