So our application is based on microservices architecture and it slows down after 2 days of usage. Once application is slow at that I see many 400 errors in application insights. So flow is basically angular is using .net core api which in turn using the services with the help of rest sharp.
Earlier We were using RestSharp to create a http requests to communicate with services from UI. So we investigated and thought the possible RestSharp is not disposing the http client correctly. We thought this because once we redeploy the app everything starts working again.
So we decided to use IHttpClientFactory available in .Net because here we can leverage the inbuilt feature of creating Http clients and managing it's life but this is also not working. I believe this is somehow related to connection leaking only but not able to find out where.
Still if we redeploy the app everything starts working again.