Question: worker processes rebooting causing 502 error with worker class=gevent #2982
rujutashinde
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
I have a flask app which I run using gunicorn. This app runs on a container on Openshift. This app does get/put/post using external apis
Initially I had used
worker_class = sync
andworkers=4
andgunicorn version 19.8.1
. This works fine when i dont have multiple requests calling this app at the same time.But recently the usage of this app has increased and when we send a lot of requests we were seeing worker process
Booting 502 error.
From your FAQ I see that this can happen especially when running on containers due to memory issues.
https://docs.gunicorn.org/en/stable/faq.html#why-are-workers-silently-killed
So i increased the memory to this
The performance improved where i am now seeing less 502 errors than before, but they still occur
I also changed the
worker_class = gevent,
upgraded togunicorn 20.1.0
and changed some of the configuration for gunicorn. I still land up seeing one or two 502 errors where my posts fail and app exits, but I also see in the logs that the worker processes are being booted randomly. This is what i have for the configuration:My questions are: :
I would really appreciate some feedback on this
Thanks
Rujuta
Beta Was this translation helpful? Give feedback.
All reactions