Bryan Deter

Results comments of Bryan Deter

@asgoel The whole point is to get the results for the bulk of the requests (it's not so much running in the background for them, but running heavy calculations on...

@georgepsarakis I agree that it sounds like a multithreading issue. I'll try configuring mod_wsgi to run with 15 processes, 1 thread per process and see if I still see that...

@georgepsarakis I didn't get a chance to try today, but I believe #4670 (namely the shared `PubSub` objects not being thread safe) is related, along with #4480. It's likely what...

On Celery 4.2.0, I was able to work around this issue by doing the following: * Patch celery.backends.redis.ResultConsumer to either store _pubsub and subscribed in a thread.local or to add...

Switching RedisBackend to using polling for the web application works without application specific changes. I swapped the async backend mixin with base.SyncBackendMixin and commented out the lines referencing the result...

The results are heavy and transitive enough I don't want to put them in the database. As a more conservative option, I may just directly store the results rather than...

Are you running with multiple threads? If so, you match up somewhat with the Django setup I mentioned earlier. If not, it may be something else. My current workaround is...

Celery is fairly aggressive about registering channels in the PubSub interface, which redis-py's [documentation states is not thread safe](https://github.com/andymccurdy/redis-py#thread-safety). I think we're seeing different threads pick up different parts of...

@jheld Comments from https://github.com/celery/celery/issues/4363#issuecomment-411708951 fit with what I saw last time I poked at it - namely the result consumer initializes a PubSub which ends up getting shared across threads...

Note that while fixed, you need to use the arel syntax for the scope (`default_scope order('created_at DESC')`)