Draft: Set limit-max-requests in FastAPI
What does this merge request do and why?
Set limit-max-requests in FastAPI
This commit allows to set the limit-max-requests to the FastAPI, which terminates the worker process when the total request count exceeds the limit. This is useful for constantly refreshing the Cloud Run instance.
This feature is disabled by default. Only when AIGW_FASTAPI__LIMIT_MAX_REQUESTS
is specified, the limit is active.
Related to https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17366#note_1717666796
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Shinya Maeda