-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize gunicorn settings running with docker #30
Comments
Replacing sync with gevent, closes #30
@zephylac have you any experience with gunicorn settings? Sometimes requests are timing out on our live servers using the following settings:
I now am trying the following settings instead which are recommended in the post above.
|
I don't have any experience with gunicorn but I can try to have a look into it and find some info. I'm currently spamming my instance with request but I didn't experienced any timeout (for now). |
I've looked into it a little bit. I've already seen some info about On my side I've tried to timeout my workers (without changing current gunicorn parameters). On both extreme load or rest, my workers don't seem to timeout. |
Thanks for looking this up @zephylac - if you are running your batch requests, could you also run them against api.openrouteservice.org at the same time? I can send you a token allowing a higher quota - if you agree - which email could I send the token to? |
I've sent you an email ! |
Under which architecture are you running your service ? Are you using docker ? Are you running on VM or dedicated ? |
We are running this on a VM in our openstack environment with 32GB RAM and 8 cores. The postgis database is running on a different and smaller VM with unfortunately with very slow disks (which soon will be updated to SSDs). The containers running on this VM are
|
Does the workers are timing out even on idle ? Or just under load ? I've looked on my logs, none of my workers have timed out during 1 week of intense load. |
Some requests will simply timeout but I haven't found a pattern for this yet. |
Maybe PostgreSQL12 & PostGIS 3 will fix a part of this issue by supporting correctly the parallelization. |
Agreed. Did you test the live API with the token I sent you by any chance @zephylac ? |
Yup I tried but it seems it has expired. |
Ah shit, sorry - it's now extended forever ;-) and won't expire anymore (same token as in the email). |
Hi @TimMcCauley, |
maybe this topic might help? https://pythonspeed.com/articles/gunicorn-in-docker/ |
Hi @lingster, |
Sorry for joining the party so late. @boind12 could you run ANALYZE in the ops schema once and check again? What kind of requests are you running and are you able to do the same directly in SQL and see how it behaves (you can print the sql query and fill the placeholders manually)? How much memory are you giving Docker and have you played around with pgtune settings? In a nutshell: it's most likely a postgres issue. |
Hi @TimMcCauley,
|
Sporadically the gunicorn workers time out - this may be due to the worker class settings: http://docs.gunicorn.org/en/stable/settings.html
The text was updated successfully, but these errors were encountered: