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

WatchVariableError #131

Closed
pratheekrebala opened this issue Jun 19, 2019 · 3 comments · Fixed by #153
Closed

WatchVariableError #131

pratheekrebala opened this issue Jun 19, 2019 · 3 comments · Fixed by #153

Comments

@pratheekrebala
Copy link
Contributor

pratheekrebala commented Jun 19, 2019

I'm getting a aioredis.errors.WatchVariableError: ('WatchVariableError errors:', 'WATCH variable has changed') when I'm running my queue.

I noticed that you had already raised a similar issue at: aio-libs-abandoned/aioredis-py#558

Are you still seeing the same issue using arq? Do you by chance have a workaround for this?

I have a simple queue setup and the only thing I'm doing differently is using aioredis.create_sentinel_pool() to generate the redis connection pool before feeding it to the redis_pool parameter on the worker.

    r = RedisConfig
    sentinel_client_pool = aioredis.sentinel.create_sentinel_pool(
        [(r.host, r.port)],
        db=r.database,
        password=r.password,
        timeout=r.timeout,
        encoding='utf8'
    )

    sentinel_client_pool = await sentinel_client_pool

    redis_master = sentinel_client_pool.master_for('mymaster')
    redis_pool = ArqRedis(redis_master)
@samuelcolvin
Copy link
Owner

samuelcolvin commented Jun 19, 2019

I've prodded on that issue, maybe you could upvote it?

Are you still seeing the same issue using arq?

I haven' seen the error recently so I'm not sure what to say.

Is it likely that you're creating multiple jobs with the same key simultaneously?

@pratheekrebala
Copy link
Contributor Author

Thanks for the super quick response!

Yup, that's probably what is happening. I will try and dig in further.

I just wasn't sure if it had something to do with the difference between the way the sentinel pool is implemented vs a regular Redis ConnectionPool.

@samuelcolvin
Copy link
Owner

I don't know as I haven't used sentinel pool, but I doubt it.

samuelcolvin added a commit that referenced this issue Aug 30, 2019
samuelcolvin added a commit that referenced this issue Aug 30, 2019
* handle multiexec errors, fix #131

* history

* fix coverage
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

Successfully merging a pull request may close this issue.

2 participants