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

config best practices #339

Open
KashiMoonactive opened this issue Mar 12, 2019 · 2 comments
Open

config best practices #339

KashiMoonactive opened this issue Mar 12, 2019 · 2 comments

Comments

@KashiMoonactive
Copy link

Hi,
In our application we want to add a caching layer for certain data and during our testing we tested the behaviour of the app when cache is down and we encountered a big delay with the client until it resulted in a timeout (more than 2-3 seconds). I have tried to play around with the config and after changing the global of minTimeout and maxTimeout to 50 and retry to 2 the request failed fast.
On the otherhand on our CPU intensive machines this low threshold causes error
Error: Server at memcache-url.com:11211 not available at Client.memcachedCommand

Does anyone have a recommended config, how do you control the timeout of your request?
Also can anyone recommend a client that support auto discovery for aws cluster memcached?

Thanks ahead

@adri
Copy link

adri commented Apr 16, 2019

I'm also experiencing this error and would be interested in how to debug/set proper config values.

@calvintalbot
Copy link

I encountered the exact same error and managed to resolve it. That error seems to happen when you are not able to communicate from your server to the elasticache node. I'm not sure if my setup is the same as yours, however here are a few steps you can look into:

  • Go to your Elasticache cluster config and obtain the security group name (copy it)
  • Go to VPC in AWS and in the left menu click on Security Groups
  • Paste your security group name in the filter and click on your security group
  • Ensure that the inbound rules have the relevant CUSTOM TCP port open (generally 11211)

Other important items you need to consider

  • Ensure the Elasticache cluster has been added to the same VPC as your server (EC2)
  • DOCKER - if you are using docker, you also HAVE to expose the correct port ie: EXPOSE 11211:11211 *
  • this was my issue that resolved it instantly
    Good luck

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

3 participants