Skip to content
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

Race condition -> redis.exceptions.BusyLoadingError #98

Closed
fxkr opened this issue Mar 17, 2016 · 2 comments
Closed

Race condition -> redis.exceptions.BusyLoadingError #98

fxkr opened this issue Mar 17, 2016 · 2 comments
Assignees

Comments

@fxkr
Copy link

fxkr commented Mar 17, 2016

If I have a DB with some items in it, sometimes it takes redis too long to load them, and redislite fails with:

Traceback (most recent call last):
  File "temp.py", line 17, in <module>
    db = redislite.StrictRedis('testdb.redis')
  File "/home/fxkr/.local/lib/python2.7/site-packages/redislite/client.py", line 338, in __init__
    self.ping()
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 674, in ping
    return self.execute_command('PING')
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 571, in execute_command
    return self.parse_response(connection, command_name, **options)
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 577, in parse_response
    response = connection.read_response()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 569, in read_response
    response = self._parser.read_response()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 241, in read_response
    raise error
redis.exceptions.BusyLoadingError: Redis is loading the dataset in memory

To reproduce, generate a DB:

import redislite, os
db = redislite.StrictRedis('bug.redis')
for key in xrange(10000):
    db.hset("h1", os.urandom(32), " " * 65536)
db.save()

Then try to load it again. This will fail in most cases (on my machine):

db = redislite.StrictRedis('bug.redis')
@dwighthubbard
Copy link
Contributor

Good catch, the code to reproduce the issue is really helpful.

@dwighthubbard
Copy link
Contributor

dwighthubbard commented Apr 28, 2016

This issue should be fixed in Release 3.0.287

Please open a new issue if this is still occurring.

@dwighthubbard dwighthubbard self-assigned this Apr 28, 2016
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

No branches or pull requests

2 participants