Giter Site home page Giter Site logo

Comments (5)

ccccccmd avatar ccccccmd commented on July 18, 2024 1

Many thanks madelson!

I get the same behavior as you describe in release mode.

It's weird .

from distributedlock.

madelson avatar madelson commented on July 18, 2024

@ccccccmd thanks for filing. I'm not able to reproduce this behavior; when I run this code snippet it times out after 5s as expected.

Can you please provide a minimal repro that reproduces the behavior?

from distributedlock.

ccccccmd avatar ccccccmd commented on July 18, 2024

@ccccccmd thanks for filing. I'm not able to reproduce this behavior; when I run this code snippet it times out after 5s as expected.

Can you please provide a minimal repro that reproduces the behavior?

Thanks for quick reply.

It happened during the second visit to the API.

https://github.com/ccccccmd/WebApplication1

from distributedlock.

madelson avatar madelson commented on July 18, 2024

Hi @ccccccmd thanks for putting this together. I downloaded your app and ran your repo. The only change I made was changing the redis connection string to "localhost:6379" to hit my local redis (I'm running 4.0.9 64-bit in WSL).

I first opened one tab, which spun for a long time (made sense because of the 500s wait).

Then I opened another tab and it spun for a bit before printing:
image

Refreshing produced the same thing. Oddly, though, while the printed time always shows ~5000ms, the wall-clock time for the request is substantially longer; ~20s.

I tried setting a breakpoint at the start of the MapGet block; and indeed there is a 10-15s delay before each request even enters that block... weird.

Then I ripped out the DistributedLock code and replaced with a simple SemaphoreSlim: same behavior.

Then I tried running the app not in debug mode (CTRL+F5) and the problem goes away.

I've reported this to ASP.NET Core here: dotnet/aspnetcore#44940.

Can you try my repro steps and see if you get the same behavior I do?

from distributedlock.

madelson avatar madelson commented on July 18, 2024

Appreciate the confirmation @ccccccmd . I'm closing this issue for now since it doesn't appear to be specific to this library. It will be interesting to see what MSFT says.

from distributedlock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.