Comments (5)
Many thanks madelson!
I get the same behavior as you describe in release mode.
It's weird
from distributedlock.
@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 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.
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:
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.
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)
- Timeout exceeded when trying to acquire the lock HOT 2
- Promote all NonParallelizable tests to their own non-parallelizable fixtures and try adding Parallelizable at the fixture level
- Azure leases expire HOT 1
- Adding a synchronization channel HOT 2
- Adding logging HOT 2
- Optimize TestSetupTest.VerifyAllTestsAreCreated
- FileDistributedLock - Use FileSystemWatcher to optimize wait
- Where locks are stored when using Postgres HOT 3
- Postgres lock is not released in specific multi-threaded scenarios HOT 13
- Update minimum SqlClient versions to avoid vulnerability HOT 2
- Postgres: consider leveraging batching for efficiency (newer versions only)
- Postgres: consider switching to positional parameter style
- Postgres: consider constructor with NpgsqlDatasource
- ZooKeeperNetEx connection loss issue: an acquired lock seems is not released HOT 55
- Azure: create the container on the fly if it does not exist HOT 4
- Increase in lost lock after upgrading to .NET 7, EF Core 7 and Microsoft.Data.SqlClient 5.0.1 HOT 21
- Add custom data to AzureBlobLeaseDistributedLock HOT 10
- Redis: RedisScript (LuaScript) execution error - CultureInfo problem HOT 7
- DistributedLock.Azure: Remove MaxNonInfiniteLeaseDuration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distributedlock.