Page 1 of 1

504 timeout issues after webapp update

PostPosted: Wed Apr 13, 2016 8:45 am
by ars137
After updating the webapp (through the webapp), I can't seem to connect and receive the 504 Gateway timeout message. I tried connecting to http://<pi ip>:5000 and received the same msg. Here is the output of my ngingx error log:

pi@alarmdecoder ~ $ tail -f /var/log/nginx/error.log
2016/04/13 14:29:46 [error] 2119#0: *4 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "192.168.1.137"
2016/04/13 14:35:43 [error] 2119#0: *11 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "192.168.1.137"
2016/04/13 14:39:34 [error] 2119#0: *13 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "192.168.1.137"
2016/04/13 14:42:47 [error] 2119#0: *19 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "192.168.1.137"
2016/04/13 14:52:06 [error] 22089#0: *4 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "alarmdecoder.local"
2016/04/13 14:53:15 [error] 22088#0: *7 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:5000/favicon.ico", host: "alarmdecoder.local"
2016/04/13 14:55:11 [error] 22089#0: *43 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:5000/favicon.ico", host: "alarmdecoder.local"
2016/04/13 14:57:58 [error] 22091#0: *50 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET /5000 HTTP/1.1", upstream: "http://127.0.0.1:5000/5000", host: "192.168.1.137"
2016/04/13 14:58:58 [error] 22091#0: *50 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:5000/favicon.ico", host: "192.168.1.137"
2016/04/13 15:04:00 [error] 22091#0: *53 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.12, server: , request: "GET /5000 HTTP/1.1", upstream: "http://127.0.0.1:5000/5000", host: "192.168.1.137"

any help please?

Re: 504 timeout issues after webapp update

PostPosted: Wed Apr 13, 2016 2:54 pm
by kevin
Try restarting gunicorn - sudo /etc/init.d/gunicorn restart - hope that helps, if not, let us know.

Re: 504 timeout issues after webapp update

PostPosted: Wed Apr 13, 2016 3:12 pm
by ars137
Ok I will try restarting gunicorn. But I'm also wondering how I can disable SSL, as I think that might also be causing an issue.

Is there an nginx config file i need to modify? Do I need to delete the keys/cert I generated?

Re: 504 timeout issues after webapp update

PostPosted: Wed Apr 13, 2016 3:15 pm
by kevin
The nginx config file is in /etc/nginx/sites-available - the one we provide on the image automatically generates certificates and provides SSL. You may get a warning about the certificate, but that's just because the CA certificate is not built in to browsers/OS. It is SSL and safe to continue if using our default configuration.

You can bypass nginx to see if it is the problem by going to http://alarmdecoder.local:5000