LockManagerAcquireError: could not acquire a lock. #124
-
Hello @weyoss , Debug Error:
We have a use case where we would like to use redis-smq library in two different projects which are connected to the same Redis server. Each project makes use of the Scheduling Messages feature. We observed that only consumers of one project are able to consume the messages from We tried using the namespaces, but they didn't work as those don't apply to the global keys. So, is there a way to make both projects use the same Redis server, but their consumers should only consume messages produced by their respective producers? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@Abhiram-DLVSS Thank you for opening this issue. Application namespace, which can be set using a configuration object, does not apply to redis-smq global keys. Scheduled messages from different namespaces are stored in a unique queue for scheduled messages. If you are running many consumers at the same time, only one consumer at a time would be able to dispatch messages from scheduled messages queue (using background workers) and in such case the error you have shown is not expected. Could you please provide the steps to reproduce it? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. It clears things up. Regarding the error that I have highlighted, I got it when I printed the error before To clarify, the error is not being thrown by the library. While debugging, I discovered that this error is preventing other consumers from working. Therefore, I have included it here to provide a clearer explanation of my situation. |
Beta Was this translation helpful? Give feedback.
-
Then it is totally fine. That is the way the message queue is designed to work. Consumer background jobs are allowed to run from only one consumer instance at a time. When the consumer instance goes down, one of the other instances takes control and background jobs are launched from that instance. |
Beta Was this translation helpful? Give feedback.
@Abhiram-DLVSS
Then it is totally fine. That is the way the message queue is designed to work. Consumer background jobs are allowed to run from only one consumer instance at a time. When the consumer instance goes down, one of the other instances takes control and background jobs are launched from that instance.