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

PERSIST error #1044

Closed
bmbouter opened this issue Feb 19, 2019 · 4 comments
Closed

PERSIST error #1044

bmbouter opened this issue Feb 19, 2019 · 4 comments

Comments

@bmbouter
Copy link

I'm looking for more insight into what could be going wrong. Our application uses RQ for tasking. During our tests suite, randomly a test will fail here and there with a traceback error like this one:

File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", line 799, in perform_job
  rv = job.perform()
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 597, in perform
  self.connection.persist(self.key)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/redis/client.py", line 1360, in persist
  return self.execute_command('PERSIST', name)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/redis/client.py", line 784, in execute_command
  pool.release(connection)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/redis/connection.py", line 1032, in release
  self._in_use_connections.remove(connection)

What could be happening to RQ that causes the client to remove a connection when a PERSIST operation is issued?

@dkliban
Copy link

dkliban commented Feb 19, 2019

I work with @bmbouter on Pulp and 2 days ago we noticed problems with our test suite hanging on Travis. The cause of the hang was a worker that is stuck in a 'busy' state. Downgrading from redis client 3.2.0 to 3.1.0 resolved this problem.

@rochacbruno
Copy link

Looks like it is related to redis/redis-py#1136

@rochacbruno
Copy link

Redis-Py devs suggested a monkey patching for now

from redis.selector import SelectSelector

class MySelector(SelectSelector):
    def check_is_ready_for_command(self, timeout):
        return True


from redis import connection
connection.DefaultSelector = MySelector

@selwin
Copy link
Collaborator

selwin commented May 25, 2019

This is not a bug in RQ.

@selwin selwin closed this as completed May 25, 2019
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

4 participants