Comments (7)
Oh, by the way, in case you were wondering: we're not using a wait_timeout
of less than a millisecond. It's that on a subsequent iteration of the while
loop, diff
is sometimes that small.
from sidekiq.
Ok, I see:
- A limiter call loops until the
diff
value gets down to <0.001. - Sidekiq issues a BLMOVE call with timeout <0.001.
- Because Redis treats that as a zero timeout, BLMOVE times out on the client-side after 1 second.
Thank you for figuring that out!
from sidekiq.
Redis 7.2.3 does not display this behavior. It pauses:
$ redis-cli
127.0.0.1:6379> BLMOVE foo bar LEFT RIGHT 0.1
(nil)
127.0.0.1:6379> BLMOVE foo bar LEFT RIGHT 0.01
(nil)
127.0.0.1:6379> BLMOVE foo bar LEFT RIGHT 0.001
(nil)
127.0.0.1:6379> BLMOVE foo bar LEFT RIGHT 0.0001
(nil)
127.0.0.1:6379> BLMOVE foo bar LEFT RIGHT 0.000001
(nil)
127.0.0.1:6379> BLMOVE foo bar LEFT RIGHT 0
Whereas 0 actually blocks.
from sidekiq.
Interesting. I just verified the behavior I described above (on Redis 7.0) using redis-cli
directly (just in case there was an issue in redis-client
). It's blocking with a timeout of 0.001.
So this is either Redis version-dependent or possibly platform-dependent (this redis server is running on linux).
from sidekiq.
Oh, also: the exact version I'm looking at is 7.0.7. A colleague just tried this out on his locally-installed redis (7.0.11 on macos). A timeout of 0.001 did not block.
from sidekiq.
Okay, found it: redis/redis@574a49b
In fact, this seems to have been fixed in the very next version (7.0.8). So that's some bad luck for us.
from sidekiq.
Thanks for all the research. It appears to be a Redis bug which has been fixed so I'll close with no action.
from sidekiq.
Related Issues (20)
- Enterprise 7.2 and "NX: true" HOT 2
- Invalid base64 when viewing dead job HOT 5
- Fatal error (machine stack overflow) on job retry HOT 2
- feature request: allow float for process count HOT 2
- `unique_for` locks are not cleared when inline jobs finish HOT 3
- Information request about scalability and concurrency settings HOT 1
- Batch has a non-existent pending job that prevents it's completion. HOT 5
- Doc / `Error Handling` doc in wiki, It is based on the old spec of `error_handlers`
- Sidekiq bypasses Redis proxy? HOT 6
- Efficient job search HOT 3
- Rails logger tagged error HOT 3
- Feature: `attr_reader` for `LeakyBucket` config options HOT 1
- Batch stuck in pending with JIDs showing as both pending and failed HOT 4
- Information request about redis partitioning HOT 3
- failed_at field is empty for the job in the DeadSet HOT 4
- Client middleware completes before the job is pushed to Redis HOT 1
- After bumping Sidekiq from 7.1.1 to 7.2.2, the Chrome browser is not displaying the dashboard and history. HOT 4
- More strict CSP policy HOT 1
- Locale from session can be a symbol, but causes sidekiq web to error out
- Sidekiq Pro CVE Patch HOT 1
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 sidekiq.