Last post Jan 22, 2021 03:33 PM by bruce (sqlwork.com)
None
0 Points
1 Post
Jan 22, 2021 12:25 PM|ivan.mesarc@gmail.com|LINK
I have simple test for asp net core 5 web api :
[HttpGet]
I send 20 requests to server.
But my app deployed to IIS can process only 10 requests.
When 10 request is processed, it process next 10 requests.
public async Task<int> GetAsync()
{
string ConnectionString = "Min Pool Size=20;Pooling=true;Server=172.31.3.177;Database=mantra2017;Integrated Security=SSPI;";
using (SqlConnection c = new SqlConnection(ConnectionString))
await c.OpenAsync();
using (SqlCommand sc = new SqlCommand("WAITFOR DELAY '00:00:20';", c))
await sc.ExecuteNonQueryAsync();
}
return 77;
Thanks
Ivan
All-Star
58144 Points
15646 Posts
Jan 22, 2021 03:33 PM|bruce (sqlwork.com)|LINK
Check your testing tools network traffic. perhaps it’s doing a head request first.
None
0 Points
1 Post
Why is my controller blocking?
Jan 22, 2021 12:25 PM|ivan.mesarc@gmail.com|LINK
I have simple test for asp net core 5 web api :
[HttpGet]
I send 20 requests to server.
But my app deployed to IIS can process only 10 requests.
When 10 request is processed, it process next 10 requests.
public async Task<int> GetAsync()
{
string ConnectionString = "Min Pool Size=20;Pooling=true;Server=172.31.3.177;Database=mantra2017;Integrated Security=SSPI;";
using (SqlConnection c = new SqlConnection(ConnectionString))
{
await c.OpenAsync();
using (SqlCommand sc = new SqlCommand("WAITFOR DELAY '00:00:20';", c))
{
await sc.ExecuteNonQueryAsync();
}
}
return 77;
}
Thanks
Ivan
All-Star
58144 Points
15646 Posts
Re: Why is my controller blocking?
Jan 22, 2021 03:33 PM|bruce (sqlwork.com)|LINK
Check your testing tools network traffic. perhaps it’s doing a head request first.