{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2840","repository_url":"https://api.github.com/repos/aspnet/KestrelHttpServer","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2840/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2840/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2840/events","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/2840","id":352922797,"node_id":"MDU6SXNzdWUzNTI5MjI3OTc=","number":2840,"title":"Kestrel dies because of Out of Memory exception","user":{"login":"HassanHashemi","id":6805984,"node_id":"MDQ6VXNlcjY4MDU5ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6805984?v=4","gravatar_id":"","url":"https://api.github.com/users/HassanHashemi","html_url":"https://github.com/HassanHashemi","followers_url":"https://api.github.com/users/HassanHashemi/followers","following_url":"https://api.github.com/users/HassanHashemi/following{/other_user}","gists_url":"https://api.github.com/users/HassanHashemi/gists{/gist_id}","starred_url":"https://api.github.com/users/HassanHashemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HassanHashemi/subscriptions","organizations_url":"https://api.github.com/users/HassanHashemi/orgs","repos_url":"https://api.github.com/users/HassanHashemi/repos","events_url":"https://api.github.com/users/HassanHashemi/events{/privacy}","received_events_url":"https://api.github.com/users/HassanHashemi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2018-08-22T12:02:58Z","updated_at":"2018-08-26T17:15:12Z","closed_at":null,"author_association":"NONE","body":"One of our MVC projects keeps growing memory, and it seems that Garbage collector dose not do anything with it.\r\n\r\nThe process keeps growing until it is killed by the OS.\r\n\r\n`dmesg` outputs this log:\r\n\r\n```\r\n[961030.365411] Out of memory: Kill process 3673 (dotnet) score 913 or sacrifice child\r\n[961030.365725] Killed process 3673 (dotnet) total-vm:29592364kB, anon-rss:3565416kB, file-rss:256kB, shmem-rss:0kB\r\n```\r\n\r\n**What makes me think that it is related to, GC not working as expected is that, i have periodically called `GC.Collect() ` and memory immediately drops down significantly but still keeps growing in a much slower pace.**\r\n\r\nAlso GC is running under Server mode.\r\n\r\n**Environment Info** \r\n```\r\nRuntime: .Net Core 2.1\r\nASP.NET Core 2.1\r\nWeb server: Kestrel (directly exposed)\r\nOS: Centos 7\r\n\r\n4 Core processor\r\n4GB Memory\r\n```\r\n\r\nAlso not sure if it any how related, i thought maybe GC dose not recognize memory limits, so here is the output of `ulimit` command:\r\n```\r\ncore file size          (blocks, -c) 0\r\ndata seg size           (kbytes, -d) unlimited\r\nscheduling priority             (-e) 0\r\nfile size               (blocks, -f) unlimited\r\npending signals                 (-i) 15062\r\nmax locked memory       (kbytes, -l) 64\r\nmax memory size         (kbytes, -m) unlimited\r\nopen files                      (-n) 1024\r\npipe size            (512 bytes, -p) 8\r\nPOSIX message queues     (bytes, -q) 819200\r\nreal-time priority              (-r) 0\r\nstack size              (kbytes, -s) 8192\r\ncpu time               (seconds, -t) unlimited\r\nmax user processes              (-u) 15062\r\nvirtual memory          (kbytes, -v) unlimited\r\nfile locks                      (-x) unlimited\r\n```\r\n**Notes**\r\n* the apps works as expected on Windows server 2016.\r\n* this may or may not be a duplicate of #1976 but all the issues in there are being tracked separately.\r\n\r\n**Update**\r\nAdding entire `dmesg` log [here ](https://gist.github.com/HassanHashemi/d1aa177a9cf552ef0cc8572f84e2dce3)as gist to keep things clear.\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/416053982","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/2840#issuecomment-416053982","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2840","id":416053982,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjA1Mzk4Mg==","user":{"login":"davidfowl","id":95136,"node_id":"MDQ6VXNlcjk1MTM2","avatar_url":"https://avatars3.githubusercontent.com/u/95136?v=4","gravatar_id":"","url":"https://api.github.com/users/davidfowl","html_url":"https://github.com/davidfowl","followers_url":"https://api.github.com/users/davidfowl/followers","following_url":"https://api.github.com/users/davidfowl/following{/other_user}","gists_url":"https://api.github.com/users/davidfowl/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfowl/subscriptions","organizations_url":"https://api.github.com/users/davidfowl/orgs","repos_url":"https://api.github.com/users/davidfowl/repos","events_url":"https://api.github.com/users/davidfowl/events{/privacy}","received_events_url":"https://api.github.com/users/davidfowl/received_events","type":"User","site_admin":false},"created_at":"2018-08-26T17:15:12Z","updated_at":"2018-08-26T17:15:12Z","author_association":"MEMBER","body":"@HassanHashemi is this during development or are you seeing these types of issues in production?"}}
{"actor":{"display_login":"davidfowl"}}