question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object encoding fails with ClusterError: TTL exhausted error

See original GitHub issue

From 1.1.0 version. From time to time my test script fails with ClusterError: TTL exhausted error with code like this:

 key_with_types = []
for key in ret:
      obj_encoding = self.redis.object(infotype='ENCODING', key=key)
      obj_type = self.redis.type(key)
       key_with_types.append({'type': obj_type, 'encoding': obj_encoding})

This happens always with any values of reinitialize_steps. From library source i see that execution tree in client.py always goes with that case then i got this error: c6703-clip-81kb

  1. Seng Object encoding command
  2. Catch MoveError
  3. Select redirect_addr
  4. Try again

Actually redirect_addr will never be never used in this while loop. The AskError will never be catched becouse of asking variable will never be True in this loop.

The dirty fix (and i do not know is this correct) is set asking=True if refresh_table_asap happens.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
trtgcommented, May 3, 2018

@Grokzen What I ended up doing- which may or not be helpful to you was to just bring up a single node with cluster-enabled yes in its redis.conf and nothing else. Once it was up I ran:

for i in `seq 0 16383`; do redis-cli -c -h my-cluster cluster addslots $i; done

I just needed a node with cluster semantics, to mimic our production stack, I didn’t actually need a multiple node cluster, so this approach seemed to work fine, all other containers in my compose setup can talk to the node in question. I wonder (but did not test it) if it’s possible to set redis.conf to bind to a hostname rather than to an IP, i.e.:

bind my-cluster

in the redis.conf ^^^^ in hopes that it would make cluster slots return a hostname rather than 127.0.0.1

0reactions
Grokzencommented, Mar 26, 2019

@pq-dong This is not a issuissue with this lib, the issue is that you are running the redis servers inside docker and when you do that, then redis will track the docker ip address that is inside the container and when your client connects to each server, redis returns to the client that “all nodes are here, here and over here” and if you connect your client from outside the machine that docker runs on, it will not know where your cluster is when it tries to resolve the ip address of the docker container. The difference between systems might be what IP address that the docker container exposes or binds to it’s internal cluster state.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Grokzen/redis-py-cluster - Gitter
ClusterError : TTL exhausted. Output completed (1 sec consumed) - Normal Termination Hi,when i use redis-py-cluster got the problem,i google found it's a...
Read more >
Grokzen/redis-py-cluster | Build 470 - Coveralls.io
1 # ‑*‑ coding: utf‑8 ‑*‑ 3 # python std lib 4 import random 18× 5 import sys 18×
Read more >
Redis TTL Exhaustion Error - Reddit
I have a service which currently for tech debt reason I can't fully update so using Redis 3.0+ but have this issue where...
Read more >
Aerospike Go Client v6 - Go Packages
MaxUint32 // TTLDontUpdate will not change the record's ttl when record is ... func NewCluster(policy *ClientPolicy, hosts []*Host) (*Cluster, Error).
Read more >
101 WXE-00010 to WXE-21271 - Oracle Help Center
WXE-08002: Failed to find an Oracle Web Cache listening port that does not require SSL ... Action: Check the XML object for possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found