question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question about the Gunicorn config

See original GitHub issue

Hey, thanks for the project and your work. I have a question about the Gunicorn config. The official Cloud Run tutorial for Python applications (in this case Flask and not async) states that this config should be used:

CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app

I understand that this might not be the best config for FastAPI applications but they explicitly say that “Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.”

So is there a reason to use your timeout value of 60 instead of the recommended one?

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
anthonycorletticommented, Jun 25, 2021

You mean tiangolo’s gunicorn-uvicorn containers? Nope, I haven’t run them myself, but from looking at the code I would absolutely trust them! Thinking of even integrating some of them into this repo.

0reactions
pbizimiscommented, Jun 23, 2021

Have you tried the recommended config in production?

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ — Gunicorn 20.1.0 documentation
What types of workers are there? How can I figure out the best number of worker processes? How can I change the number...
Read more >
Where is the Gunicorn config file? - python - Stack Overflow
The answer is in the documentation of gunicorn. http://docs.gunicorn.org/en/latest/configure.html. You can specify the config file with .ini ...
Read more >
problem getting gunicorn.conf file to work in /etc/init - Ask Ubuntu
If I start the service using sudo service gunicorn start , no socket is created and no gunicorn process is spawn (I can...
Read more >
Gunicorn can't access a .ini file containing credentials to parse ...
I don't understand why Gunicorn can't access the config.ini file located in my project folder, next to settings.py . I can access those...
Read more >
How can I ensure Azure App Service uses my gunicorn.conf ...
Microsoft Q&A is the best place to get answers to all your technical questions on Microsoft products and services. Community. Forum.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found