Skip to content
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

failed to acquire cache lock and failed to unlock #2166

Closed
AIchovy opened this issue Mar 7, 2017 · 2 comments
Closed

failed to acquire cache lock and failed to unlock #2166

AIchovy opened this issue Mar 7, 2017 · 2 comments

Comments

@AIchovy
Copy link

AIchovy commented Mar 7, 2017

Summary

I use kong:cassandra this docker image,and use its default configuration.Then I add a POST method api and make 200 concurrent time post requests continuously.There are some error happend;
This api have 3000 tps when do not use kong, but only 200 now.

It seems that lua-resty-lock this module's problem, i turn up lua_shared_dict cache_locks 100k to 2m.
But still not work.
So,i dont know where the problem is.
Help please...

Steps To Reproduce

  1. run images kong:cassandra3&cassandra:2.2
  2. add a api
  3. use jmeter to post requests

error log:

database_cache.lua:146: get_or_set(): failed to acquire cache lock: timeout, client: x.x.x.x server: kong, request: "POST /producer/stockmsg HTTP/1.1", host: "x.x.x.x:port"
2017/03/07 03:49:01 [error] 112#0: *10925 [lua] database_cache.lua:165: get_or_set(): failed to unlock: unlocked, client: x.x.x.x, server: kong, request: "POST /producer/stockmsg HTTP/1.1", host: "x.x.x.x:port"
...
Constantly appear above the wrong

BTW:i use jmeter to post request.

Additional Details & Logs

  • Kong version (0.9.0.0)
  • Operating System centos7&docker 1.10.3
  • kong docker images kong:cassandra3
  • database cassandra 2.2
@Tieske
Copy link
Member

Tieske commented Mar 9, 2017

  • kong docker images kong:cassandra3
  • database cassandra 2.2

Which is it? Cassandra 3 or Cassandra 2.2? Note that for Kong 0.9.x only Cassandra 2.x is supported. Kong 0.10 supports Cassandra 3.

Also Kong 0.9.x has seen quite some fixes, so latest for that version is 0.9.9. Have you tried that, or even better the (brand) new 0.10

@Tieske
Copy link
Member

Tieske commented Mar 14, 2017

see #2186 and #2197

closing this one

@Tieske Tieske closed this as completed Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants