We're having a devil of a time with our new server, which went live yesterday after two months of testing.
Every so often, nginx will display a 502 gateway error page, and something like this will appear in the logs: 2012/03/02 18:05:38 [error] 29743#0: *1479 upstream prematurely closed connection while reading response header from upstream, client: nn.nn.nn.nn, server: nn.nn.nn.nn, request: "GET /some/path/ HTTP/1.1", upstream: "passenger:unix:/passenger_helper_server:", host: "example.com" This only occurs on some pages, but once it has happened on a page, it seems to keep happening. It doesn't happen straight away - the server can run happily for some time before the errors start occurring. The pages that trigger the error don't seem to be particularly hard work for the server. However, the same pages can be expected to trigger it, while some never do. Merely restarting nginx doesn't get rid of the errors - they come back again. As soon as DEBUG = True is applied in settings and nginx restarted, the errors disappear. Some things that seem to have improved matters: * increasing somaxconn to 1024 * turning off cacheing In fact after turning off cacheing it was some hours before the errors returned. We are running nginx, with a passenger_wsgi.py file setting up the path and pointing to the settings.py file. I'd appeciate any tips on what the problem might be, or how to go about isolating it. Obviously an error that occurs under heavy load is not unusual, though I don't think the load is particualrly heavy (and this server has taken over from one rather less powerful that has been doing the same job for two years). What is puzzling is the error that occurs only on particular apparently arbitrary pages, and then persists, even after the load conditions (we were using ApacheBench to test) have disappeared. Daniele -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.