All our websites go to one single apache machine that proxies out the requests to the various backend servers. (Btw, I think I’d like to replace apache with nginx, but this is what’s running now).
Our latest sites run with gunicorn behind nginx.
One URL took a long time to render. Calculating a year’s worth of data. Longer than 30 seconds. And after 30 seconds I’d get an nginx “502 Bad Gateway” error. Looking at the nginx error log I’d see a comment about an upstream gateway unexpectedly closing the connection.
Solution: call gunicorn with
Now that I’ve written it down I can google it in two years’ time when I’ve forgotten all about it :-) To close it off, here’s a picture of with lots and lots of lines. An apache/nginx/gunicorn problem is less complicated :-)
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):