gevent cooperative multitasking appears to break Connexion v3 FlaskApp? #1998
Unanswered
chrisinmtown
asked this question in
Q&A
Replies: 1 comment
-
I hope someone will comment on the breakage. Maybe the connexion migration guide should mention this? I expect I'm not the only person trying to migrate a Connexion v2 app who chose to use I tried using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to upgrade an app from Connexion v2 to v3. The old app uses the FlaskApp and gevent-provided cooperative multi-tasking so the server can process multiple requests in parallel. The old approach of calling the
gevent.patch_all()
function at start seems to break connexion. From what I can see, requests to the Connexion server don't finish, they just hang.To reproduce the behavior, find the Connexion
helloworld
example and add the following as the first line inhello.py
:Install the prereqs and starting the server:
The startup takes a second longer than before, but no complaints appear. Then try to load the Swagger UI at http://127.0.0.1:8080/openapi/ui/
In my experience this /never finishes/ it just loads forever. Then hit Ctrl-C to interrupt the server. It responds
Shutting down
but hangs again, a second Ctrl-C is required to make it stop.Versions: Python 3.12, connexion 3.1.0, flask 3.1.0 , gevent 24.11.1.
Is this enough information? Please advise, thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions