IdentityServer / IdentityServer3.AccessTokenValidation

OWIN Middleware to validate access tokens from IdentityServer3
Apache License 2.0
91 stars 149 forks source link

2.15 causes deadlocks/hangs under heavy load #160

Open ErikEJ opened 6 years ago

ErikEJ commented 6 years ago

It looks like this change causes thread deadlocks/hangs under heavy load (many requests (several 100s per second) running under ASP.NET) - why was the quick exit removed? https://github.com/IdentityServer/IdentityServer3.AccessTokenValidation/commit/dec7f5c14784ddcaeb3c99aaf3cced7ddf22eed1#diff-5b2c5cc8b17ae721dd148a69c90508e6L136

WebAPI 2 under ASP.NET 4.6 in Azure App Service

leastprivilege commented 6 years ago

Would this help?

https://github.com/IdentityServer/IdentityServer3.AccessTokenValidation/pull/155

ErikEJ commented 6 years ago

Sure, as it rolls back the behaviour to 2.14 implementation (which we had to roll back to)

ErikEJ commented 6 years ago

@NicolaiPetri !

brockallen commented 6 years ago

We did an update that's supposed to deal with the deadlock in Microsoft's config loader. Please test again the myget version and let us know. https://www.myget.org/gallery/identity

Thanks

ErikEJ commented 6 years ago

Is this recommended over / better performance wise than 2.14, that we have reverted to in production?

leastprivilege commented 6 years ago

We hope this fixes the problem. But you need to test it.

ErikEJ commented 6 years ago

Have you done any testing?

leastprivilege commented 6 years ago

No - but we think this is the root cause.

ErikEJ commented 6 years ago

I would be great if you were able to verify that - I will investigate possible test procedures

strtdusty commented 6 years ago

155 seems like the correct fix here.