locked
Why is my controller blocking? RRS feed

  • Question

  • User-1679007802 posted

    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

    Friday, January 22, 2021 12:25 PM

All replies

  • User-474980206 posted

    Check your testing tools network traffic. perhaps it’s doing a head request first. 

    Friday, January 22, 2021 3:33 PM