From 01a1d653086bb92962ec4dfda14478bb392c04a2 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Llorente Date: Sat, 26 May 2018 23:45:37 +0200 Subject: [PATCH] set 10 min as the lifetime for each HttpMessageHandler int the pool --- src/Web/WebMVC/Startup.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index 24d2096ee..9c1c0a3b8 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -173,6 +173,7 @@ namespace Microsoft.eShopOnContainers.WebMVC services.AddTransient(); services.AddTransient(); + //set 5 min as the lifetime for each HttpMessageHandler int the pool services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(TimeSpan.FromMinutes(5)); //add http client services