You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is lua code. The goal is to check if rate limit is reached. If the rate limit is reached, then it should run the code and if not, the else block:
-- First check for rate limit
local limit_count = require "resty.limit.count"
local lim, err = limit_count.new("my_limit_count_store", 20, 60)
--if rate limited run application
if not lim then
ngx.log(ngx.ERR, "failed to instantiate a resty.limit.count object: ", err) -- This is done for testing if this gets called
(...) -- some lua code which already work
else
ngx.log(ngx.ERR, "failed to instantiate a rest1111111: ", err)
ngx.var.check = "fine"
end
This is the error from error log:
This is lua code. The goal is to check if rate limit is reached. If the rate limit is reached, then it should run the code and if not, the else block:
the http block contains:
Whatever I do, I always get the same error. I already tried
if not lim then
to
if lim then
and
but always with the same result.
The text was updated successfully, but these errors were encountered: