kien-truong opened a new issue, #53359: URL: https://github.com/apache/airflow/issues/53359
### Apache Airflow Provider(s) amazon ### Versions of Apache Airflow Providers ``` apache-airflow-providers-amazon==9.6.0 ``` ### Apache Airflow version 2.9.3 ### Operating System Linux ### Deployment Google Cloud Composer ### Deployment details ### What happened When using deferrable mode in our `AthenaOperator`, we frequently received blocking alert from Airflow Triggerer immediately after a `AthenaTrigger` starts ``` trigger **** starting triggerer's async thread was blocked for 2.41 seconds ``` Upon further investigation, we think the root cause is `aiobotocore` will block the event loop upon first usage when it loads credentials: https://github.com/aio-libs/aiobotocore/issues/1023 That's exactly what happen when a new trigger is started. https://github.com/apache/airflow/blob/3566b8ef6103c1341d6208eca6a4c997cff5dc0d/providers/amazon/src/airflow/providers/amazon/aws/triggers/base.py#L145-L146 ### What you think should happen instead _No response_ ### How to reproduce Use AthenaOperator (or likely any AWS deferrable operators) in deferrable mode. ### Anything else Maybe `aiobotocore` session shoud be initialized out of the event loop, cached and shared between triggerer. ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
