-
Notifications
You must be signed in to change notification settings - Fork 26
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
Question: lua-resty-upstream with lua-resty-redis #17
Comments
Yes, you simply pass your 'resty.redis' instance to the connect method. You must configure your pools and hosts first as per the overview example |
Thank you, I'll try to do as you said. But for now, I'm facing an error while configuring openresty with this module:
I just cloned it with git and passed the path to the directory to a configure parameters as What am I doing wrong? Thanks in advance. |
This is a pure Lua module, it doesn't need compiling into openresty. You simply put it somewhere that your lua_package_path will find it |
Great thank you, my bad. Now, I'm using a config like next: nginx.conf:
upstream.lua:
app.lua:
But I'm seeing in nginx log an error like next:
What am I doing wrong? Thanks in advance. |
You're setting the timeout on the pool to 5ms, that is probably too low... If that doesn't fix it can you set your log level to debug and post the full log? I'd also suggest wrapping your code up in a module rather than creating global vars |
Thanks for a suggestion, man. I set it to 1000, and the error is the same. How can I set debug level of the Lua logs (I'm a newbie in Lua, and google shows only error_log format recommendations)? |
I mean the nginx error_log log level :) |
Can this be used with lua-resty-redis to connect to an upstream of redis servers? If yes, provide me some example, if you please. Thanks in advance.
The text was updated successfully, but these errors were encountered: