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

Net::ReadTimeout Exception: timed out while waiting for more data #2

Open
jaswinder97 opened this issue Mar 10, 2019 · 3 comments
Open

Comments

@jaswinder97
Copy link

I tried to set timeout as
Dalli::KeysMatch.config.telnet({ 'Timeout' => 200, 'Prompt' => /(^END$)/ })

But it doesn't work and

.keys(/agents/

always gives timeout error

@marcosgz
Copy link
Owner

Hi @jaswinder97.

Have you tried to connect to memcached host without this gem? Just to ensure it's not network related issues.

Example:

$ memcached -l 127.0.0.1 -p 11211 -m 64 -vv
$ telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is '^]'.
get agents-1
VALUE agents-1 1 4
i
END
quit
Connection closed by foreign host.

@jaswinder97
Copy link
Author

@marcosgz I might be doing something wrong. is there any method to delete all keys under a namespace?

@marcosgz
Copy link
Owner

@jaswinder97 Memcached does not have a namespace or something like delete/query by wildcards. This project is just actually a workaround for this. But using telnet and a very large list of keys may not work correctly. I do not recommend using this gem in production.

Another good option of key-value db is Redis. And you can do something like:

redis-cli --scan --pattern your_namespace:* | xargs redis-cli del 

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

2 participants