0

It is not possible to limit the response time of a request from an application. It is necessary that the service interrupt the connection after 10s.

command=gunicorn -w 3 -k uvicorn.workers.UvicornWorker --timeout 2

--timeout is intended for another as far as I understand

Charles Han
  • 1,920
  • 2
  • 10
  • 19
qwerttttq
  • 23
  • 4
  • 1
    You are not asking something, you are making a statement. Providing a question may help here. – Marcelo Trylesinski Feb 03 '23 at 08:21
  • How can I limit the response time from the service? – qwerttttq Feb 03 '23 at 08:36
  • 1
    Please have a look at [this answer](https://stackoverflow.com/a/73743908/17865804). – Chris Feb 03 '23 at 12:05
  • Does this answer your question? [How to stop execution of FastAPI endpoint after a specified time to reduce CPU resource usage/cost?](https://stackoverflow.com/questions/73716578/how-to-stop-execution-of-fastapi-endpoint-after-a-specified-time-to-reduce-cpu-r) – Sam Mason Feb 08 '23 at 23:23
  • @Chris it's been a while so I've referenced your link in a vote to close as a dup – Sam Mason Feb 08 '23 at 23:24

0 Answers0