Reputation: 137
I am trying to change the timeout for Gunicorn on a Python 3.7 Amazon Linux 2 (Version 3.1) Elastic Beanstalk deploy. My Procfile looks like:
web: gunicorn --bind :8000 --workers 3 --threads 2 --timeout 300 application.application:application
But I still seem to be getting the default 30 second timeout.
My nginx config in .ebextensions looks like:
files:
"/etc/nginx/conf.d/timeout.conf" :
mode: "000644"
owner: root
group: root
content: |
keepalive_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
Any help would be appreciated.
Upvotes: 4
Views: 1681
Reputation: 238995
Since you are using Amazon Linux 2 (AL2), setting nginx
options through /etc/nginx/conf.d/timeout.conf
is not supported. This would explain why they don't have any effect.
For AL2, nginx
settings should be set using .platform/nginx/conf.d/
folder as show here.
Thus, you could try the following. Have a file .platform/nginx/conf.d/myconfig.conf
with the content of:
keepalive_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
Upvotes: 4