Limitando o tamanho do pool de conexões e connection lifetime (requisito AWS).

Proxy fiddler.
This commit is contained in:
Adriano Serighelli 2025-09-30 13:08:30 -03:00
parent ec61534f17
commit 26bd4d1da9

View File

@ -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()