delano / redis-dump

Redis to JSON and nack again
https://rubygems.org/gems/redis-dump
MIT License
818 stars 123 forks source link

Connection timed out occured while dump a big redis instance #13

Open highkay opened 11 years ago

highkay commented 11 years ago

When I dump a 10,000,000 keys redis instance into a json, I got a "Connection timed out". I wonder the issue may caused by command "keys", would it be some hot fix in a near future?

delano commented 11 years ago

What is the timeout value set in your redis.conf? Try increasing that. You can do it without editing the config or restarting using redis-cli:

$ redis-cli 
> config get timeout
> config set timeout 120
> config get timeout
highkay commented 11 years ago

0, it is always be 0. Well, other client works well, I guess maybe the huge keys cause the problem(consume too many memory stuff).

delano commented 11 years ago

Do you know how large the key is (estimated)?

highkay commented 11 years ago

I use "keys *" on a smaller redis instance(around 30,000 results), it works. And on the large one(more than 10,000,000 results return), it failed.

jaleszek commented 10 years ago

Seems to timeout 0 doesn't work as assumed. When I'm setting to 0 I'm getting many timeouts (from other clients also), when set to 120 works more stable ... strange

shortdudey123 commented 9 years ago

Having this issue when dumping a keyspace of 8 million. Timeout is set for a huge number but redis-dump times out after a couple seconds.

delano commented 9 years ago

Ya, I imagine that's annoying.

@shortdudey123 what's the timeout set to in your redis.conf.

shortdudey123 commented 9 years ago

@delano not sure off the top of my head, but its several hours

pzhuk commented 9 years ago

Same issue for me - timeout after few secs, even if filter is applied in order to dump small amount of keys

celesteking commented 9 years ago

It's also slow as shit because it doesn't use pipelining. Look for util elsewhere.

tianyu4552 commented 6 years ago

i have meet the same promblem. How can i resovle it?

wuhuaxu commented 5 years ago

26

jason-gao commented 4 years ago

redis-dump -u :pass@127.0.0.1:6379 -D -d 3 -c 500 > ./redisprodb3.json

use -c set chunck size,一次500条,可规避timeout