Hi!
I have created a small asp.net core API, which has one endpoint that resolves OpenGraph tags and sends back its results.
You can get the full source code here:
https://github.com/MHamburg/opengraph.api
The problem I am facing:
If I run this asp.net core api locally (not using docker) and I run the attached stress tester, all works great. The stress tester ends correctly and memory usage is constant.
However, when I use docker locally and I run the attached stresstester, the docker container will freeze. (as if there is a deadlock happening)
If I run this docker container on Rancher, it will endlessly eat up all memory (as if no garbage collection is being done). (at least it does not freeze)
What I have done so far:
Tried to set:
<ServerGarbageCollection>false</ServerGarbageCollection>
Did not change anything
Tried to set a max memory on the docker instance so that the garbage collector knows it is not allowed to use up all memory (which had a bug in asp.net core which was fixed in 2.0.3), but this does not change anything (it will simply crash the container as it will be OOM).
(also did numerous unrelated things, that did not resolve this isssue)
Related issues, that did not resolve my issue:
https://github.com/dotnet/coreclr/issues/14991
https://github.com/dotnet/coreclr/issues/13489#issuecomment-343416765
https://github.com/aspnet/aspnet-docker/issues/300
To run the stresstester:
dotnet .\StressTester.dll "http://localhost:xxxx" where xxxx is the port number assigned to your instance
Any ideas? I am left with none =(
Additional info:
Win 10, dev machine:
Output of `dotnet --info`
.NET Command Line Tools (2.1.2)
Product Information:
Version: 2.1.2
Commit SHA-1 hash: 5695315371
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.3
Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df