pallavi-laserdata commented on issue #77553:
URL: https://github.com/apache/airflow/issues/77553#issuecomment-7202974629

   Thanks for the stack dumps, they make the cause easy to see. One detail 
stands out: the client counter reached consumer-1340, so every trigger run 
creates and closes a consumer, and all of them share one group.id. Each join or 
leave triggers a rebalance for the others, so close() is quite likely to land 
in the middle of one, which is exactly where your thread is stuck 
(rd_kafka_assign inside the rebalance callback).
   
   Things worth trying, from least to most invasive:
   
   1. Reuse the consumer across trigger restarts instead of creating one per 
run, so there are far fewer joins and leaves.
   2. Give each trigger/topic its own group.id (or static membership with 
group.instance.id). A trigger on topic A then never takes part in a rebalance 
caused by topic B.
   3. As a safety net, run close() with a timeout on its own thread instead of 
the shared sync_to_async thread, so one hang can't freeze the event loop. 
Calling unsubscribe() before close() may also avoid the callback path, but I 
haven't verified that with this client version.
   
   Option 2 alone would probably have prevented the week-long freeze here, 
since the two topics that fired within a second would not have shared a group.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to