8000 RedisClusterException: Timed out attempting to find data in the correct node! · Issue #888 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

RedisClusterException: Timed out attempting to find data in the correct node! #888

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

Closed
Barbery opened this issue Jul 14, 2016 · 6 comments · Fixed by #2459
Closed

RedisClusterException: Timed out attempting to find data in the correct node! #888

Barbery opened this issue Jul 14, 2016 · 6 comments · Fixed by #2459

Comments

@Barbery
Copy link
Contributor
Barbery commented Jul 14, 2016

Hi, I found some connection throw this error, but I can't reappear the error, it seems random occurrence.

@michael-grunder
Copy link
Member

This can happen if it is actually timing out. Have you tried increasing the timeout?

@Barbery
Copy link
Contributor Author
Barbery commented Jul 14, 2016

Hi @michael-grunder
My read_timeout and timeout is 3 seconds. ok, I will try to increase it, hope it work.

@michael-grunder
Copy link
Member

Feel free to send an update if increasing the timeout doesn't help!

@marcdejonge
Copy link
Contributor

Re-open please. We're having the same problem on a regular basis right now in our cluster. What I have found is the following tcpstream:

*3
$4
MGET
$26
{features}:xxx
$27
{features}:yyy
-MOVED 15237 10.10.10.189:6381
*3
$4
MGET
$26
{features}:xxx
$27
{features}:yyy
-MOVED 15237 10.10.10.189:6381
*3
$4
MGET
$26
{features}:xxx
$27
{features}:yyy
-MOVED 15237 10.10.10.189:6381
*3
$4
MGET
$26
{features}:xxx
$27
{features}:yyy
-MOVED 15237 10.10.10.189:6381
*3
$4
MGET
$26
{features}:xxx
$27
{features}:yyy
-MOVED 15237 10.10.10.189:6381
...

And this continues for 1854 packets is 1 second, after which it times out. To be clear, the connection is to 10.10.10.188! It seems that the wrong socket is linked in the internal map of sockets.

@marcdejonge
Copy link
Contributor

To be clear, this seems to occur randomly, but right now we are seeing it 2 - 3 times per hour for a couple of hundred connections at a time, while handling about 10.000 ops on 3 redis master nodes.

@yvvq
Copy link
yvvq commented Feb 11, 2020

image

There are huge amount of codes, I post related codes below . I will try to reproduce this problem with simple codes.
$this->connection = @new \RedisCluster(
null,
$this->getParameter('hosts'),
$this->getParameter('timeout'),
$this->getParameter('read_write_timeout'),
$this->getParameter('persistent')
);
$this->connection ->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE);

$this->connection->hgetall("mall_api.user_info.1222");

kjoe added a commit to kjoe/phpredis that referenced this issue Mar 17, 2024
When a node timeout occurs, then phpredis will try to connect to another
node, whose answer probably will be MOVED redirect. After this we need
more time to accomplish the redirection, otherwise we get "Timed out
attempting to find data in the correct node" error message.

Fixes phpredis#795 phpredis#888 phpredis#1142 phpredis#1385 phpredis#1633 phpredis#1707 phpredis#1811 phpredis#2407
michael-grunder pushed a commit that referenced this issue Mar 25, 2024
When a node timeout occurs, then phpredis will try to connect to another
node, whose answer probably will be MOVED redirect. After this we need
more time to accomplish the redirection, otherwise we get "Timed out
attempting to find data in the correct node" error message.

Fixes #795 #888 #1142 #1385 #1633 #1707 #1811 #2407
michael-grunder pushed a commit that referenced this issue Aug 29, 2024
When a node timeout occurs, then phpredis will try to connect to another
node, whose answer probably will be MOVED redirect. After this we need
more time to accomplish the redirection, otherwise we get "Timed out
attempting to find data in the correct node" error message.

Fixes #795 #888 #1142 #1385 #1633 #1707 #1811 #2407
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

Successfully merging a pull request may close this issue.

4 participants
0