How to increase FastAPI timeout in Docker to be deployed on AWS EB?

I am deploying a FastAPI application which is dockerized. I deployed that dockerized file on AWS Elastic Beanstalk. But for some functions, the process is taking more than 60 seconds, and it times out. I need the timeout to be at least 300 seconds. How can I accomplish this?
I tried CMD and ENTRYPOINT in the Dockerfile, but didn’t work. I tried using gunicorn config file with timeout settings but didn’t work. I also tried modifying dockerrun.aws.json with the code ‘"timeout":300’, didn’t work as well. What is the best solution to this?

Thanks.

Source: Docker Questions

LEAVE A COMMENT