opeida opened a new issue, #56129:
URL: https://github.com/apache/airflow/issues/56129

   ### Apache Airflow version
   
   3.1.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   The API server crashes when the "Users" page is opened. The following error 
occurs (the full error listing is provided below):
   `sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 `
   
   It may be related to pgbouncer config but it would be great if the API 
server handled the error without crashing:
   ```
   pgbouncer:
       enabled: true
       nodeSelector: 
         cloud.google.com/gke-nodepool: service-pool
       configSecretName: airflow-pgbouncer-config
       metricsExporterSidecar:
         statsSecretName: airflow-pgbouncer-stats
       maxClientConn: 200
       metadataPoolSize: 20
       resultBackendPoolSize: 5
   ```
   
   ### Screen recording
   
https://github.com/user-attachments/assets/b009c2dc-4d0e-4db8-9766-de9446167cf4
   
   ### What you think should happen instead?
   
   The API server should handle the error without crashing.
   
   ### How to reproduce
   
   Setup the env with pgbouncer config provided above, open the Users page and 
try to add a user.
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-celery==3.12.3
   apache-airflow-providers-common-compat==1.7.4
   apache-airflow-providers-common-io==1.6.3
   apache-airflow-providers-common-sql==1.28.1
   apache-airflow-providers-fab==2.4.3
   apache-airflow-providers-google==18.0.0
   apache-airflow-providers-http==5.3.4
   apache-airflow-providers-postgres==6.3.0
   apache-airflow-providers-redis==4.3.1
   apache-airflow-providers-smtp==2.2.1
   apache-airflow-providers-standard==1.8.0
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Deployed on GKE with extended image based on apache/airflow:slim-3.1.0 and 
Helm chart 1.18.0.
   Migrated from 3.0.6.
   
   ### Anything else?
   
   <details><summary>Log listing</summary>
   <p>
   
   2025-09-26T00:52:47.911362Z [error    ] Exception on 
/static/appbuilder/js/ab.js [GET] [airflow.providers.fab.www.app] 
loc=app.py:1744
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", 
line 2528, in wsgi_app
       ctx.push()
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/ctx.py", 
line 375, in push
       self.session = session_interface.open_session(self.app, self.request)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_session/sessions.py", 
line 524, in open_session
       session_id=store_id).first()
                            ^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2824, in first
       return self.limit(1)._iter().first()
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2916, in _iter
       result = self.session.execute(
                ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:47.918931Z [error    ] Exception on 
/static/appbuilder/css/bootstrap-datepicker/bootstrap-datepicker3.min.css [GET] 
[airflow.providers.fab.www.app] loc=app.py:1744
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", 
line 2528, in wsgi_app
       ctx.push()
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/ctx.py", 
line 375, in push
       self.session = session_interface.open_session(self.app, self.request)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_session/sessions.py", 
line 524, in open_session
       session_id=store_id).first()
                            ^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2824, in first
       return self.limit(1)._iter().first()
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2916, in _iter
       result = self.session.execute(
                ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:47.941897Z [error    ] Exception on 
/static/dist/jquery-ui.min.js [GET] [airflow.providers.fab.www.app] 
loc=app.py:1744
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", 
line 2528, in wsgi_app
       ctx.push()
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/ctx.py", 
line 375, in push
       self.session = session_interface.open_session(self.app, self.request)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_session/sessions.py", 
line 524, in open_session
       session_id=store_id).first()
                            ^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2824, in first
       return self.limit(1)._iter().first()
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2916, in _iter
       result = self.session.execute(
                ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:47.957171Z [error    ] Exception on 
/static/appbuilder/css/fontawesome/solid.min.css [GET] 
[airflow.providers.fab.www.app] loc=app.py:1744
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", 
line 2528, in wsgi_app
       ctx.push()
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/ctx.py", 
line 375, in push
       self.session = session_interface.open_session(self.app, self.request)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_session/sessions.py", 
line 524, in open_session
       session_id=store_id).first()
                            ^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2824, in first
       return self.limit(1)._iter().first()
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2916, in _iter
       result = self.session.execute(
                ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:47.983286Z [error    ] Exception on 
/static/appbuilder/js/jquery-latest.js [GET] [airflow.providers.fab.www.app] 
loc=app.py:1744
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", 
line 2528, in wsgi_app
       ctx.push()
     File "/home/airflow/.local/lib/python3.12/site-packages/flask/ctx.py", 
line 375, in push
       self.session = session_interface.open_session(self.app, self.request)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_session/sessions.py", 
line 524, in open_session
       session_id=store_id).first()
                            ^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2824, in first
       return self.limit(1)._iter().first()
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/query.py", 
line 2916, in _iter
       result = self.session.execute(
                ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:48.695435Z [error    ] Unable to retrieve variable from 
secrets backend (MetastoreBackend). Checking subsequent secrets backend. 
[airflow.models.variable] loc=variable.py:449
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/models/variable.py", 
line 445, in get_variable_from_secrets
       var_val = secrets_backend.get_variable(key=key)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/session.py", 
line 100, in wrapper
       return func(*args, session=session, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/secrets/metastore.py",
 line 64, in get_variable
       var_value = session.scalar(select(Variable).where(Variable.key == 
key).limit(1))
                   
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1747, in scalar
       return self.execute(
              ^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/future/engine.py",
 line 412, in connect
       return super(Engine, self).connect()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:48.908020Z [error    ] Unable to retrieve variable from 
secrets backend (MetastoreBackend). Checking subsequent secrets backend. 
[airflow.models.variable] loc=variable.py:449
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/models/variable.py", 
line 445, in get_variable_from_secrets
       var_val = secrets_backend.get_variable(key=key)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/session.py", 
line 100, in wrapper
       return func(*args, session=session, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/secrets/metastore.py",
 line 64, in get_variable
       var_value = session.scalar(select(Variable).where(Variable.key == 
key).limit(1))
                   
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1747, in scalar
       return self.execute(
              ^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/future/engine.py",
 line 412, in connect
       return super(Engine, self).connect()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:49.069771Z [error    ] Unable to retrieve variable from 
secrets backend (MetastoreBackend). Checking subsequent secrets backend. 
[airflow.models.variable] loc=variable.py:449
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/models/variable.py", 
line 445, in get_variable_from_secrets
       var_val = secrets_backend.get_variable(key=key)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/session.py", 
line 100, in wrapper
       return func(*args, session=session, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/secrets/metastore.py",
 line 64, in get_variable
       var_value = session.scalar(select(Variable).where(Variable.key == 
key).limit(1))
                   
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1747, in scalar
       return self.execute(
              ^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/future/engine.py",
 line 412, in connect
       return super(Engine, self).connect()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   2025-09-26T00:52:49.441056Z [error    ] Unable to retrieve variable from 
secrets backend (MetastoreBackend). Checking subsequent secrets backend. 
[airflow.models.variable] loc=variable.py:449
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/models/variable.py", 
line 445, in get_variable_from_secrets
       var_val = secrets_backend.get_variable(key=key)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/session.py", 
line 100, in wrapper
       return func(*args, session=session, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/secrets/metastore.py",
 line 64, in get_variable
       var_value = session.scalar(select(Variable).where(Variable.key == 
key).limit(1))
                   
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1747, in scalar
       return self.execute(
              ^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1716, in execute
       conn = self._connection_for_bind(bind)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 1555, in _connection_for_bind
       return self._transaction._connection_for_bind(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 750, in _connection_for_bind
       conn = bind.connect()
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/future/engine.py",
 line 412, in connect
       return super(Engine, self).connect()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3325, in connect
       return self._connection_cls(self, close_with_result=close_with_result)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 96, in __init__
       else engine.raw_connection()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3404, in raw_connection
       return self._wrap_pool_connect(self.pool.connect, _connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", 
line 3371, in _wrap_pool_connect
       return fn()
              ^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 327, in connect
       return _ConnectionFairy._checkout(self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 894, in _checkout
       fairy = _ConnectionRecord.checkout(pool)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", 
line 493, in checkout
       rec = pool._do_get()
             ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", 
line 134, in _do_get
       raise exc.TimeoutError(
   sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, 
connection timed out, timeout 30.00 (Background on this error at: 
https://sqlalche.me/e/14/3o7r)
   
   </p>
   </details> 
   
   ### 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]

Reply via email to