Fixed event capture from building infinite list#5870
Conversation
|
@auvipy What kind of test do you have in mind? |
|
this can be addressed in point release. |
Do you know if we already have a test for it? if yes you can implement covering what you added |
| forced via :exc:`KeyboardInterrupt` or :exc:`SystemExit`. | ||
| """ | ||
| return list(self.consume(limit=limit, timeout=timeout, wakeup=wakeup)) | ||
| for _ in self.consume(limit=limit, timeout=timeout, wakeup=wakeup): |
There was a problem hiding this comment.
Although, the fix seems correct, I could not find a connection with worker functionality. Event capturing is performed by specific commands only. Could you please explain how this method affects the worker? Thanks!
|
@Prodge a feedback on this one would be highly appreciated! we still experience memory leak issues and hoping a permanent fix is being released, thanks |
can you try this patch? |
|
I'm evaluating the possibility to patch staging as well as upgrading to celery 4.4.0 (have reviewed the changelog and seen some memory leak fixes have been applied to that version https://github.com/celery/celery/releases/tag/4.4.0 - want to identify if those are fixing our problem or not) and perform some tests, I'll update you as soon as I get to that |
|
I'm about to test the patch in our version of celery 4.2.1 in staging. I'll give some updates as soon as I have some feedback |
|
I can confirm the proposed patch fixed the memory leak, we run some tests over the weekend and did not see any memory leak occurring |
|
@auvipy Do you know when we can expect to see this in an official release? |
|
I also wanted to share with you that once I applied this flag --without-gossip --without-mingle --without-heartbeat in the celery multi string I have seen a general improvement in the performances celery <--> rabbitmq - on the rabbitmq side we often were seeing disconnection and very high cpu utilisation. After applying this fix all these behaviours disappeared Hope this helps |
ASAP! It may be the last day of Feb! |
consumeis a generator returning an infinite list ofNones.Wrapping this in a
listwill slowly build this list, holding it in memory.This is a very slow leak and is only visible over some time when there is a large volume of events.
Supersedes #5482.
Fixes #4843.