What case redis not send PONG?

192 views
Skip to first unread message

dusu...@126.com

unread,
Sep 7, 2016, 2:41:08 AM9/7/16
to Redis DB
I use sentinel, have 3 VM: 192.168.16.111, 192.168.16.112, 192.168.16.113. Each VM runs 1 redis and 1 sentinel. It smooth running for a month, but recently, the sentinel log frequently appear sdown, and failover about everyday, sometimes it will failed to failover and must restart by manually.
First I think it maybe networks problem, but I dump packages by tcpdump, found no package lost or delay, but also appear sdown, I saw 113 sent PING to 112(PSH), normally, 112 response PONG to 113(PSH,ACK), then 113 ACK to 112, but sometimes, 112 just ACK to 113, not response PONG. Why this happen?

tcpdump of 192.168.16.112:

redis log of 192.168.16.112:

sentinel log of 192.168.16.113:


hva...@gmail.com

unread,
Sep 7, 2016, 3:51:21 PM9/7/16
to Redis DB


On Tuesday, September 6, 2016 at 11:41:08 PM UTC-7, dusu...@126.com wrote:

First I think it maybe networks problem, but I dump packages by tcpdump, found no package lost or delay, but also appear sdown, I saw 113 sent PING to 112(PSH), normally, 112 response PONG to 113(PSH,ACK), then 113 ACK to 112, but sometimes, 112 just ACK to 113, not response PONG. Why this happen?


You're experiencing latency.  I.e., a command is sent to a Redis instance, but there's a long time before a reply is returned.  Latency.

What does the Redis website say about latency problems?  Halfway down http://redis.io/documentation is:

Troubleshooting

The two links in the bullet point go to the same page: http://redis.io/topics/problems .  The very first item on that page is "latency problems" and it points to the page http://redis.io/topics/latency , which has a checklist of things that cause latency.  Number one on that list is "Make sure you're not running slow commands" (i.e., sending a slow command to the Redis instance).


The most likely reason a Redis instance will take a long time to answer a command is that a client sent it a command that runs slowly instead of quickly.  Farther down that same page is an explanation of the kinds of commands that may run slowly (cause latency).  The number one item on the checklist recommends enabling the Redis slow log to see what commands your Redis instances are receiving that are running slowly.


Take a look at the checklist and find out which of those are causing latency in your Redis instances.



Reply all
Reply to author
Forward
0 new messages