How to increase request timeout error for larger requests in ngnix

Viewed 45

I have trained the machine for a few specific tasks. Deploy it into Django with Nginx and Gunicorn on AWS EC2. Whenever I generate a request based on a small input, it works fine. In the case of large input, it takes so much time. I needed that time. Eventually, the "502 Bad Gateway" error message appears. How I can prevent this error. I thought it was nginx request timeout error. So I increased using

http{
   ...
   proxy_read_timeout 300;
   proxy_connect_timeout 300;
   proxy_send_timeout 300;
   ...
}

So, is there a solution? I'm new to StackOverflow, so please bear with me.

0 Answers
Related