Comments (3)
Hi,
yes, stale locks can appear because of a forceful termination of sidekiq process.
To cleanup such locks sidekiq-limit_fetch
checks if process which should be responsible for locks is around every once in a while. If process is dead then locks are terminated.
Before 1.3 version a detection of dead processes was once in 9 minutes. It was obviously too long.
So starting with 1.3 version a required time to detect such situation is 2 minutes.
But I think even shorter interval is necessary for better experience, so I will release a new version with 30 seconds time interval.
from sidekiq-limit_fetch.
I have a question about these locks. Are you referring to the "pause" or "block" keys in redis, or the "busy" queues?
On my server, I can see that for a given queue called "critical" the pause and block are nil, but the "busy" queue always contains 1 item, even when I can confirm that no critical job is being processed:
redis 127.0.0.1:6379> llen limit_fetch:busy:critical
(integer) 1
I would have expected this llen to be zero, since no workers are working on that queue. Is this expected behaviour, or do I have a stale lock in my critical queue?
from sidekiq-limit_fetch.
Yes, currently it's an expected behavior.
pause:_, *_block:*** keys indicate user values, values that were set by you.
busy:* keys indicate how many workers at the moment potentially work on a queue.
Why potentially work? Because sidekiq-limit_fetch
passes a list of a possible queues to sidekiq
, which sidekiq
then queries for a task. After task was picked we release all other given to this worker queues. So currently there is no separation whether queue is probed by a worker or whether queue is worked on by a worker.
I'm going to improve this behavior and distinguish these two phases in the next release of sidekiq-limit_fetch
.
from sidekiq-limit_fetch.
Related Issues (20)
- Redis deprecation notice HOT 9
- undefined local variable or method `options' for #<Sidekiq::Manager> HOT 5
- NoMethodError: undefined method `logger' for Hash HOT 1
- Sidekiq 6.5.1 deprecation warning options use HOT 5
- Error starting Sidekiq Ruby 2.7 Sidekiq 6.5.x HOT 2
- Allow dynamic exclusion
- redis.brpop Passing the timeout as a positional argument is deprecated HOT 1
- Redis 5.0.0 compatibility: Redis#sadd will always return an Integer HOT 1
- ERROR: Error fetching job: undefined method `map' for nil:NilClass HOT 12
- Digest::Base cannot be directly inherited in Ruby HOT 4
- Broken with Sidekiq 7? HOT 7
- lowest priority vs weighted?
- Limit is not being enforced? HOT 7
- no jobs executing with limit 1 HOT 8
- Sidekiq 7 tests failing HOT 1
- undefined method `to_sym' for ["active_storage_analysis", 4]:Array HOT 3
- Sidekiq 7 limit not enforced HOT 9
- Sidekiq 7 Embedding results in eval error: undefined method `map' for nil:NilClass
- Queue leak HOT 2
- ignore
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-limit_fetch.