From 26bd4d1da9784c51db759c7e3e581c45e8546909 Mon Sep 17 00:00:00 2001 From: Adriano Serighelli Date: Tue, 30 Sep 2025 13:08:30 -0300 Subject: [PATCH] =?UTF-8?q?Limitando=20o=20tamanho=20do=20pool=20de=20cone?= =?UTF-8?q?x=C3=B5es=20=20e=20connection=20lifetime=20(requisito=20AWS).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Proxy fiddler. --- Program.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Program.cs b/Program.cs index 25dfe77..cbbd3d5 100644 --- a/Program.cs +++ b/Program.cs @@ -11,12 +11,13 @@ using Npgsql; internal class Plat_integ { - static string PG_CONN_STRING_PROD = "Server = smart-energia-dev-pgsql.cykff7tj7mik.us-east-1.rds.amazonaws.com; Port = 5432; Database = smartenergiaprod; User Id = postgres; Password = VfHml#Z78!%kvvNM; Timeout = 300;CommandTimeout = 300"; - static readonly HttpClient client = new HttpClient(new HttpClientHandler { + static string PG_CONN_STRING_PROD = "Server = smart-energia-dev-pgsql.cykff7tj7mik.us-east-1.rds.amazonaws.com; Port = 5432; Database = smartenergiaprod; Username = postgres; Password = VfHml#Z78!%kvvNM; Timeout = 60; CommandTimeout = 60; ApplicationName = new_med_5_min; Connection Lifetime = 120; Minimum Pool Size = 2; Maximum Pool Size = 2;"; + static readonly HttpClient client = new HttpClient(new HttpClientHandler + { ClientCertificateOptions = ClientCertificateOption.Automatic, - Proxy = new WebProxy("127.0.0.1", 8888), - UseProxy = true, - ServerCertificateCustomValidationCallback = (HttpRequestMessage req, X509Certificate2? cert, X509Chain? chain, SslPolicyErrors errors) => true + //Proxy = new WebProxy("127.0.0.1", 8888), + //UseProxy = true, + //ServerCertificateCustomValidationCallback = (HttpRequestMessage req, X509Certificate2? cert, X509Chain? chain, SslPolicyErrors errors) => true }); static async Task Main()