Code: Select all
public ActionResult Get()
{
using (var connnection = new Devart.Data.MySql.MySqlConnection("User Id=xxx;Password=xxx;Host=192.168.1.2;Port=3306;Database=xxx;Unicode=True;Compress=False;Protocol=Ssl;Persist Security Info=True;Connection Timeout=60;Pooling=True;Connection Lifetime=20;Validate Connection=False;Found Rows=True;SSL TLS Protocol=1.2"))
{
try
{
connnection.Open();
try
{
}
finally
{
connnection.Close();
}
}
finally
{
}
}
Code: Select all
public async Task<string> CallWeb()
{
HttpClient client = new HttpClient();
HttpResponseMessage response = await client.GetAsync(APIURL + "/v1/Test");
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsStringAsync();
}
Using Devarts mysql connection is 38 seconds for the last call to exit.
If I call this method, just one at a time the time it takes to open and close each connection is:
.031 SECONDS according to db monitor.
Mysql Oracle Client:
Code: Select all
using (var connnection = new MySql.Data.MySqlClient.MySqlConnection("User Id=xxx;Password=xxx;Host=192.168.1.2;Port=3306;Database=xxx;"))
{
try
{
connnection.Open();
try
{
}
finally
{
connnection.Close();
}
}
finally
{
}
}
I've tried adjusting Devarts connection string to every permutation I can think of and still the same results. In the debugger it literally feels like Devarts mysqlconnection is waiting on something. This is not the same when using Oracles mysql connector client for .net:
Install-Package MySql.Data -Version 8.0.13