GoogleCloudPlatform / functions-framework-python

FaaS (Function as a service) framework for writing portable Python functions
https://pypi.org/p/functions-framework/
Apache License 2.0
849 stars 117 forks source link

functions-framework and tuning gunicorn #302

Open jgrn307 opened 7 months ago

jgrn307 commented 7 months ago

First up, I LOVE this package. It's making our development so much faster. One question I had was what would be a "best practice" for developing a DOCKER that we want to tune gunicorn (which I understand functions-framework uses as long as --debug isn't invoked). Say I have a line in my dockerfile:

CMD exec functions-framework --target=mycode

Is there some way to pass along the gunicorn tuning parameters to this statement? If not, what would be the correct way of adjusting e.g. threads and workers. Do I need to replace this entire line with e.g.

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

xSAVIKx commented 3 months ago

I guess this is the same question/issue I raised here. There's no way to fine tune this unfortunately 😞