Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Error while parsing my RDB file. #17

moechofe opened this Issue · 4 comments

2 participants


redis_version: 2.4.14

Traceback (most recent call last):
File "/usr/local/bin/rdb", line 9, in <module>
  load_entry_point('rdbtools==0.1.3', 'console_scripts', 'rdb')()
File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.3-py2.7.egg/rdbtools/cli/", line 79, in main
File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.3-py2.7.egg/rdbtools/", line 287, in parse
  self._expiry = to_datetime(read_unsigned_int(f) * 1000000)
File "/usr/local/lib/python2.7/dist-packages/rdbtools-0.1.3-py2.7.egg/rdbtools/", line 705, in to_datetime
  dt = datetime.datetime.utcfromtimestamp(seconds_since_epoch)
ValueError: timestamp out of range for platform time_t

@moechofe Thank you for reporting this issue.

Can you answer the following questions so I can debug this further?

  1. What version of redis are you using?
  2. What commands do you use to expire keys? expire, expireat, pexpire, pexpireat?
  3. What are the typical expiry times that you use? Is it in seconds/minutes/hours/months/days?

After trying with two other scripts, it seems the expiration in microseconds is not recognized by your script.

FD $unsigned int            # FD indicates "expiry time in seconds".
FC $unsigned long           # FC indicates "expiry time in ms".

And my extraction script crash at the first key with an expiration.

I'm using the expire command to set expiry time in hours or days.

Here is the first bytes of my file:

52 45 44 49 53 30 30 30 32 REDIS0002

Thank you to spend your time on my problem.


@moechofe Quick update - I haven't been able to reproduce this issue yet. Haven't given up yet, will continue looking. In the meant time, if you have any other pointers, please leave a message on this issue.



My RDB file was corrupted, sorry for the useless issue.

@moechofe moechofe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.