Skip to content

CPU overflow on Airflow subprocesses #32871

Closed Answered by potiuk
4andy asked this question in Q&A
Jul 26, 2023 · 5 comments · 9 replies
Discussion options

You must be logged in to vote

Thanks for being so diligent I would love to hear what it is.

Q: Are you using PgBouncer beetween Airflow and your Postgres ? Because if you DON't then THIS is the most probable reason. Airflow opens a lot of connection to the database and that might cause the memory usage of postgres to go ballistic if you have a lot of parallel tasks and dag file processor parsing tasks. Postgres works in the way that it spawns a new process for every connection, it does not multiplex them in the way that mysql does, so well configured PGBouncer is pretty much a MUST if you want to use Postgres.

If Postgres eats all memory and start swapping out then you might indeed have a VERY slow connection establis…

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@4andy
Comment options

@4andy
Comment options

@potiuk
Comment options

potiuk Aug 9, 2023
Collaborator

@potiuk
Comment options

potiuk Aug 9, 2023
Collaborator

@potiuk
Comment options

potiuk Aug 9, 2023
Collaborator

Comment options

You must be logged in to vote
2 replies
@4andy
Comment options

@potiuk
Comment options

potiuk Aug 11, 2023
Collaborator

Answer selected by 4andy
Comment options

You must be logged in to vote
1 reply
@potiuk
Comment options

potiuk Aug 17, 2023
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants