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

Runtime error: table index is nil #44

Open
ktosikowski opened this issue Jun 8, 2020 · 0 comments
Open

Runtime error: table index is nil #44

ktosikowski opened this issue Jun 8, 2020 · 0 comments

Comments

@ktosikowski
Copy link

The following error is visible in nginx logs when trying to set value in lrucache:

*10 lua entry thread aborted: runtime error: /usr/share/lua/5.1/resty/lrucache.lua:223: table index is nil

Code leading to the error:

  access_by_lua_block {

    local lrucache = require "resty.lrucache"
    local cache, cache_init_err = lrucache.new(10)

    if not cache or cache_init_err then
        log(ERROR, "Failed to create cache. Reason: " .. (cache_init_err or "unknown"))
    else
        cache:set("dog", 32)
    end
  }

lua-resty-lrucache ver.: 0.08

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

1 participant