Search code examples
.netasp.net-coreiis

why sometimes first api request after some idle time take over 15s?


i have some api in .net core configured everything i can so apppol is not recycled / always running etc enter image description here

but still if i wait 10/15min betwen requests first call takes >15s and each next one 10ms

i did enabled logging to se what is taking this time and i see that this is

  1. -MODULE_SET_RESPONSE_SUCCESS_STATUS

enter image description here

how to trace why it is taking so long ?

what is it doing?

thanks and regards


Solution

  • for future searchers it was waiting for .net to veryfy cert revocation list (probably some timeout on geting this list or something...)

    the fix was

    services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme).AddCertificate(
         o => 
         {
             o.RevocationMode = System.Security.Cryptography.X509Certificates.X509RevocationMode.NoCheck; 
         });