Generally python server script execution time does not bother too much and
server persons do not struggle with them like apache/php but sometimes
similar conditions may arrive.
Developers do not use any reverse proxy web server like nginx or apache to
resolve the port on the domain. They access the site with localhost and port.
Here they do not get 'connection time out' 'bad gateway' or similar issues.
They see the error on command line and start fixing them.
But reverse proxy web servers do not log 'server side language error', they
show the error in the format of internal server error like 501, 502, 503 etc
In this scenario, script execution time needs to increase in web server.
Solution :
Open virtual host in the nginx and add the parameters under vrtualhost of
domain.
Add under location /
proxy_connect_timeout 3600; proxy_send_timeout 3600; proxy_read_timeout 3600; send_timeout 3600;
The time is in second.
Complete snippet of 'location /'should look like this.
location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:8000/; proxy_set_header X-Forwarded-Proto $scheme; proxy_hide_header X-Powered-By; server_tokens off; autoindex off; etag off; proxy_connect_timeout 6000; proxy_send_timeout 6000; proxy_read_timeout 6000; send_timeout 6000; }
Restart nginx.
Now timeout error should not be there again.