{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/8492","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/8492/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/8492/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/8492/events","html_url":"https://github.com/aspnet/Mvc/issues/8492","id":362801457,"node_id":"MDU6SXNzdWUzNjI4MDE0NTc=","number":8492,"title":"Batch Process - Sql Connection Failures","user":{"login":"joetherod","id":2990362,"node_id":"MDQ6VXNlcjI5OTAzNjI=","avatar_url":"https://avatars3.githubusercontent.com/u/2990362?v=4","gravatar_id":"","url":"https://api.github.com/users/joetherod","html_url":"https://github.com/joetherod","followers_url":"https://api.github.com/users/joetherod/followers","following_url":"https://api.github.com/users/joetherod/following{/other_user}","gists_url":"https://api.github.com/users/joetherod/gists{/gist_id}","starred_url":"https://api.github.com/users/joetherod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joetherod/subscriptions","organizations_url":"https://api.github.com/users/joetherod/orgs","repos_url":"https://api.github.com/users/joetherod/repos","events_url":"https://api.github.com/users/joetherod/events{/privacy}","received_events_url":"https://api.github.com/users/joetherod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-21T23:19:35Z","updated_at":"2018-09-21T23:19:35Z","closed_at":null,"author_association":"NONE","body":"I ported over a .NET Windows Service to MVC Core using HostedService. It is a batch process that runs daily and does a lot of reads against SQL and MongoDB. SQL is the painstaken issue. Declared service that does the sql calls as singletons, container scoped, thread local with no avail. The process also spins off about 500 threads. I had no issues with in .NET 4.5 running on windows. Now, it consumes all the memory and high CPU and I cant around the SQL connection issues. Its able to connect many times and then it just dies on 2 issues,\r\n\r\n\"BeginExecuteReader requires an open and available Connection. The connection's current state: Broken.\"\r\nor\r\nUnable to connect to sql server. (Connection pool exhausted)\r\n\r\nThe sql calls are Dapper based, wrapper around ADO.NET.\r\nCore seems to issues with managing sql connections and memory leaks.\r\nTried so many combinations of registrations and limiting the number of uses of the service that has the sql connection. No luck.\r\n\r\nI am using the latest .NET Core 2.1."}}
{"actor":{"display_login":"joetherod"}}