This leak is one per request, and it's reproducible locally. Seems like there is no way to turn off the diagnostic listener ?Īlso tried to turn it off in the web.config but this is ignored by core. ConfigureLogging((hostingContext, logging) => ) I have tried turning logging off by this code: If i send 40000 requests, i get 40000 diagnostic listeners. If i remove the db context from the controller i get this (also after 500 requests): So if i send 500 requests to the test project locally and take a dump, i get this i VS: So during analysis of the dumps they found a a huge amount of diagnostic listeners which where not released. Just a follow up, we have a case going on with case id 119031526000920 Only thing I can think of is if a mvc filter is keeping the context alive, but it is set to the default scoped, so should be disposed of after every request? It is noted that left long enough the GC appears to release the memory, but that is after a substantial amount of time, and running even synchronous requests will cause the memory to 'overflow'. We run docker containers with microsoft/dotnet:2.1-aspnetcore-runtime with 200MB soft limit and 400MB hard limit.Īre there any temporary workarounds for this before 3.0, as while it is not completely critical (as the services restart themselves) it is causing massive headache and concern when under load. It will reach its peak allocated memory and then force terminate the task. Similar results on AWS ECS with an increase in memory usage on every query request. We have memory dumps etc but not so easy to figure out whats causing You are not the only one experiencing this, I was on my way here today to make an issue about it. I can't believe we are the only ones experiencing this. If we remove the context from the controller, and AddDbContext in startup, doing a simple array create of 1mb, no DB access. The memory keeps raising until azure restarts it: To this endpoint: api/memtest/test/1111111Īt the red line 8k requests (24k requestst in total) Now we are running some custom loadtest with 20 clients, 100 requests per client, repeated 4 times. Set ASPNETCORE_ENVIRONMENT to Development. One simple controller with one simple context query. It's a new core 2.2 webapi, added one context, one table, added context in startup. (From 2.0)Īnd we have narrowed it down to the simplest app which still leaks. We have been experiencing massive memory leaks in all our microservices after upgrading to net core 2.2.3 and EF 2.2.3.
0 Comments
Leave a Reply. |