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
875 stars 118 forks source link

fix: reduce gunicorn concurrency to at most 4 * maximum available cor… #259

Closed garethgeorge closed 1 year ago

garethgeorge commented 1 year ago

Updates gunicorn's multithreading logic to derive the maximum concurrency the container can handle from the number of cores available to the functon. 4 invocations per core (given that memory additionally scales with cores) will be a good default concurrency limit that most functions will support without running into resource problems.