Limitando o tamanho do pool de conexões e connection lifetime (requisito AWS).
Proxy fiddler.
This commit is contained in:
parent
ec61534f17
commit
26bd4d1da9
11
Program.cs
11
Program.cs
@ -11,12 +11,13 @@ using Npgsql;
|
|||||||
|
|
||||||
internal class Plat_integ
|
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 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 {
|
static readonly HttpClient client = new HttpClient(new HttpClientHandler
|
||||||
|
{
|
||||||
ClientCertificateOptions = ClientCertificateOption.Automatic,
|
ClientCertificateOptions = ClientCertificateOption.Automatic,
|
||||||
Proxy = new WebProxy("127.0.0.1", 8888),
|
//Proxy = new WebProxy("127.0.0.1", 8888),
|
||||||
UseProxy = true,
|
//UseProxy = true,
|
||||||
ServerCertificateCustomValidationCallback = (HttpRequestMessage req, X509Certificate2? cert, X509Chain? chain, SslPolicyErrors errors) => true
|
//ServerCertificateCustomValidationCallback = (HttpRequestMessage req, X509Certificate2? cert, X509Chain? chain, SslPolicyErrors errors) => true
|
||||||
});
|
});
|
||||||
|
|
||||||
static async Task Main()
|
static async Task Main()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user