-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not acquire a lock from redis error - on creating observe request. #832
Comments
Yes. We lock on Endpoint Name because we want atomic operation for a given endpoint name. The question is why you get the |
I am facing this issue very often when there are so many concurrent observe request towards device . Redis has huge number of keys . Your advice is not to change the key for locking mechanism for observe request and to increase the duration to acquire the redis key lock correct? |
On a race condition, RedisLock could block a Jedis resource for a longer duration while it waits to acquire lock. Just wondering, if it makes sense to release the Jedis resource back to pool, when RedisLock.acquire goes to sleep for 10ms. |
Not really. If I found time, I will try to reproduce this on my side.
Maybe it could 🤔 Not directly linked but I think we should :
I also ask myself if log is enough when we failed to acquired. 🤔 |
Thanks Simon. We narrowed down the issue to another application which was running a "keys *" command on Redis, which eventually slowed down other Redis clients. We dont see a problem in Leshan per se, but this extension would help someone facing similar issue.
|
Glad to see you finally find out the issue. I will create an issue to remember to improve the RedisLock stuff. Could we close this issue ? |
By the way, as you are using Leshan, could you eventually take time to give us some information about that in : #830 🙏 |
I hope I didn't afraid you with my "leshan user research" stuff 😅 I close the issue, feel free to reopen if needed. |
Not at all. I had some personal issues to attend to. I will add the info in
some time..
…On Thu, Apr 30, 2020, 8:24 PM Simon ***@***.***> wrote:
I hope I didn't afraid you with my "leshan user research" stuff 😅
I close the issue, feel free to reopen if needed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#832 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3JTXGULTIAALKJMXTO6TRPGGJ7ANCNFSM4MKY4IKQ>
.
|
Hi ,
Leshan version M10.
I am triggering more than 20 observe request towards the same device from leshan server . Some time I see below error. If I change the lock key used now for add, addObservation and removeObservation method in RedisStoreRegistraion like LOCK:EP:deviceName:lwm2mpath (example : LOCK:EP:urn:imei:devideName:3:0:3) . Will I face any issues any where for any operations?
The text was updated successfully, but these errors were encountered: