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

   ### Apache Airflow version
   
   2.4.3
   
   ### What happened
   
   As part of debugging some UI slowness, I have tried setting 
AIRFLOW__WEBSERVER__WORKER_CLASS to gevent. However, this has broken the login 
element:
   
   `{views.py:659} ERROR - Error authorizing OAuth access token: maximum 
recursion depth exceeded while calling a Python object
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.9/site-packages/flask_appbuilder/security/views.py",
 line 657, in oauth_authorized
       except Exception as e:
     File 
"/home/airflow/.local/lib/python3.9/site-packages/authlib/integrations/flask_client/apps.py",
 line 104, in authorize_access_token
       token = self.fetch_access_token(**params, **kwargs)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/authlib/integrations/base_client/sync_app.py",
 line 341, in fetch_access_token
       token = client.fetch_token(token_endpoint, **params)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/authlib/oauth2/client.py", 
line 205, in fetch_token
       return self._fetch_token(
     File 
"/home/airflow/.local/lib/python3.9/site-packages/authlib/oauth2/client.py", 
line 343, in _fetch_token
       resp = self.session.post(
     File 
"/home/airflow/.local/lib/python3.9/site-packages/requests/sessions.py", line 
635, in post
       return self.request("POST", url, data=data, json=json, **kwargs)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/authlib/integrations/requests_client/oauth2_session.py",
 line 105, in request
       return super(OAuth2Session, self).request(
     File 
"/home/airflow/.local/lib/python3.9/site-packages/requests/sessions.py", line 
587, in request
       resp = self.send(prep, **send_kwargs)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/requests/sessions.py", line 
701, in send
       r = adapter.send(request, **kwargs)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/requests/adapters.py", line 
489, in send
       resp = conn.urlopen(
     File 
"/home/airflow/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", 
line 703, in urlopen
       httplib_response = self._make_request(
     File 
"/home/airflow/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", 
line 386, in _make_request
       self._validate_conn(conn)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", 
line 1042, in _validate_conn
       conn.connect()
     File 
"/home/airflow/.local/lib/python3.9/site-packages/urllib3/connection.py", line 
395, in connect
       self.ssl_context = create_urllib3_context(
     File 
"/home/airflow/.local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 
312, in create_urllib3_context
       context.options |= options
     File "/usr/local/lib/python3.9/ssl.py", line 603, in options
       super(SSLContext, SSLContext).options.__set__(self, value)
     File "/usr/local/lib/python3.9/ssl.py", line 603, in options
       super(SSLContext, SSLContext).options.__set__(self, value)
     File "/usr/local/lib/python3.9/ssl.py", line 603, in options
       super(SSLContext, SSLContext).options.__set__(self, value)
     [Previous line repeated 475 more times]
   RecursionError: maximum recursion depth exceeded while calling a Python 
object
   `
   
   Leaving the worker class to its default setting solves the issue, but I was 
wondering what could have gone wrong here. This doesn't seem like an airflow 
problem, rather a gunicorn one, but I would appreciate pointers if someone has 
come across this before.
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   By setting AIRFLOW__WEBSERVER__WORKER_CLASS to gevent.
   
   ### Operating System
   
   Debian GNU/Linux 11 (bullseye)
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==6.0.0
   apache-airflow-providers-celery==3.0.0
   apache-airflow-providers-cncf-kubernetes==4.4.0
   apache-airflow-providers-common-sql==1.2.0
   apache-airflow-providers-docker==3.2.0
   apache-airflow-providers-elasticsearch==4.2.1
   apache-airflow-providers-ftp==3.1.0
   apache-airflow-providers-google==8.4.0
   apache-airflow-providers-grpc==3.0.0
   apache-airflow-providers-hashicorp==3.1.0
   apache-airflow-providers-http==4.0.0
   apache-airflow-providers-imap==3.0.0
   apache-airflow-providers-microsoft-azure==4.3.0
   apache-airflow-providers-microsoft-psrp==2.0.0
   apache-airflow-providers-microsoft-winrm==3.0.0
   apache-airflow-providers-mysql==3.2.1
   apache-airflow-providers-odbc==3.1.2
   apache-airflow-providers-oracle==3.0.0
   apache-airflow-providers-postgres==5.2.2
   apache-airflow-providers-redis==3.0.0
   apache-airflow-providers-sendgrid==3.0.0
   apache-airflow-providers-sftp==4.1.0
   apache-airflow-providers-slack==6.0.0
   apache-airflow-providers-sqlite==3.2.1
   apache-airflow-providers-ssh==3.2.0
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Some customizations to the helm chart to match our environment, the worker 
class setting is added as a env value in the values.yml file.
   
   ### Anything else
   
   _No response_
   
   ### 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