-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Ledge will only connect to Redis running on localhost #194
Comments
This appears to be happening due to the worker connection timing out. So now will look into passing a connection timeout there. |
This turned out not to be the case. Setting a high timeout for both connections does not work. So I ended up proxying redis through an openresty stream block locally. However, this should not be necessary. How can I debug this issue further? |
Can you post a minimal yet complete configuration to replicate the issue? Obviously if something this fundamental wasn't working we would know about it, so it's going to be a configuration detail most likely. Specifically you're getting "connection refused" (not timed out), so I'd be looking into why OpenResty can't see your redis host. Are you using hostnames or literal IPs? |
We've tried with direct IPs and hosts. It's definitely not a hostname issue since we use these same variables elsewhere in the config with Once we switch to the localhost proxy, it works fine. This is inside a Kubernetes cluster inside AWS EKS, if that matters.
|
And you're getting |
On both connections. While you can't really tell from the logs - even removing the background worker leads to this error. |
Here's the config we use for proxying to Redis. This works, but of course is an extra step we'd love to avoid.
|
Yeah, it really shouldn't be necessary. Are all connections failing, or is it in any way intermittent over time? Nothing is jumping out at me from your config. But remember, there's no magic here. In the end, whatever you are specifying for host and port end up in tcpsock:connect. Can you try a super minimal Then next layer up is lua-resty-redis-connector, which again you could do a quick manual experiment with your config to see where it's failing. Bottom line, if your connection is being refused, it's because |
Fair enough - we will test that. Meanwhile, while connecting through the proxy, by default I believe keepalive is not supported so we may be creating more connections than we should, and are seeing lua redis connect timeouts there as well. Any tips on improving that situation? |
I can reproduce this as well, either by using the inline |
With the following config, I consistently see a
Connection refused
error:If I point CACHE_URL at localhost Redis, it works. I've tried higher timeout settings. I am able to connect to redis instantly from the command line with redis-cli.
The text was updated successfully, but these errors were encountered: