Bug description
We deploy the release version superset, and this morning we’d had an outage: Web interface was running but wouldn’t query anything.
The logs included reference to:
File "/home/ec2-user/venv/lib64/python3.9/site-packages/urllib3/connectionpool.py", line 206, in __init__
self.pool = self.QueueCls(maxsize)
File "src/gevent/queue.py", line 513, in gevent._gevent_cqueue.Queue.__init__
File "src/gevent/queue.py", line 193, in gevent._gevent_cqueue.SimpleQueue.__init__
File "/home/ec2-user/venv/lib64/python3.9/site-packages/urllib3/util/queue.py", line 13, in _init
self.queue = collections.deque()
AttributeError: attribute 'queue' of 'gevent._gevent_cqueue.SimpleQueue' objects is not writable
This led me to finding: https://github.com/miguelgrinberg/python-engineio/issues/403
And I fixed it by by adding to the system.d service file:
Environment=GEVENT_MONKEY_DISABLE_QUEUE_QUEUE=true
Dunno if it’s strictly a Superset issue, but wanted to share in case anyone else encounters it.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
File "/home/ec2-user/venv/lib64/python3.9/site-packages/urllib3/connectionpool.py", line 206, in __init__
self.pool = self.QueueCls(maxsize)
File "src/gevent/queue.py", line 513, in gevent._gevent_cqueue.Queue.__init__
File "src/gevent/queue.py", line 193, in gevent._gevent_cqueue.SimpleQueue.__init__
File "/home/ec2-user/venv/lib64/python3.9/site-packages/urllib3/util/queue.py", line 13, in _init
self.queue = collections.deque()
AttributeError: attribute 'queue' of 'gevent._gevent_cqueue.SimpleQueue' objects is not writable
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
Hi @thegareth! I'm Dosu and I’m helping the superset team.
This gevent/urllib3 queue error isn't tracked or documented in Superset's issue tracker, docs, or codebase, and there are no official recommendations for the GEVENT_MONKEY_DISABLE_QUEUE_QUEUE workaround. Superset now requires Python 3.10 or later, so running on Python 3.9 may expose you to compatibility issues like this one reference. The workaround you found—setting GEVENT_MONKEY_DISABLE_QUEUE_QUEUE=true—addresses a known incompatibility between gevent's monkey-patching and urllib3's queue usage, but Superset expects users to manage such environment-level fixes themselves. No recent pull requests or code comments mention this issue or workaround. If others hit this, your solution is currently the best-known fix.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: thegareth
Thank you Dosu, will look at installing a later Python on our distro, the default is 3.9, but 3.11 is available.