You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The task supervisor continues running indefinitely, even after the associated task process has completed #50500
At high concurrency, the task supervisor process is not able to cleanly mark the sockets closed once the task process has finished. As a result the task supervisor process runs forever. We noticed that in such cases the task supervisor thinks that there are 1 or 2 open sockets, but actually the task process has finished and there are no open sockets in the machine.
What you think should happen instead?
Task supervisor process should be able to correctly catch all the socket closing event and mark them as closed, or defensively close all sockets once the task process has finished and x amount of configurable time has passed.
How to reproduce
Run airflow worker using the task sdk at high concurrency (>1000 tasks per min), and after a while of running it, we would notice that the task supervisor process being left around with no actual task process for that supervisor process (via ps -ef)
Operating System
Debian GNU/Linux 12
Versions of Apache Airflow Providers
No response
Deployment
Astronomer
Deployment details
No response
Anything else?
Only a fraction of task supervisor process is left running with no task process (because the supervisor thinks there are open sockets which is not true based on the machine state), maybe this could be linked to task process heartbeat failures, but no confirmation on co-relation.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Activity
boring-cyborg commentedon May 12, 2025
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
kaxil commentedon May 23, 2025
@vatsrahul1001 @neel-astro Could you test changes in #51020 please to see if it fixes the issue
Fix lingering task supervisors when ``EOF`` is missed
Prevent CPU spike in task supervisor when heartbeat timeout exceeded
3 remaining items
Fix lingering task supervisors when ``EOF`` is missed (#51180)
Fix lingering task supervisors when ``EOF`` is missed (apache#51180)
Fix lingering task supervisors when ``EOF`` is missed (#51180)
[v3-0-test] Fix lingering task supervisors when ``EOF`` is missed (#5…
[v3-0-test] Fix lingering task supervisors when ``EOF`` is missed (#5…
Fix lingering task supervisors when ``EOF`` is missed (apache#51180)
[v3-0-test] Fix lingering task supervisors when ``EOF`` is missed (#5…
Fix lingering task supervisors when ``EOF`` is missed (#51180)
Fix lingering task supervisors when ``EOF`` is missed (#51180)
Fix lingering task supervisors when ``EOF`` is missed (#51180)
Fix lingering task supervisors when ``EOF`` is missed (#51180)
Fix lingering task supervisors when ``EOF`` is missed (#51180)