Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using nginx and spawnf-cgi with apc and memcache enabled.I'm getting 502 bad gate way on browser and this error on error log.

2013/01/07 06:55:46 [error] 90799#0: *53 upstream prematurely closed connection while reading response header from upstream, client: a.b.c.d, server:, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/fcgi.sock:", host: ""
share|improve this question
Did you ever resolve this? I have run into the same issue. – Abe Miessler Mar 7 '13 at 18:57
up vote 0 down vote accepted

It was related to the version of PHP. I have used latest version of nginx and little old version of PHP.The issue has been fixed by updating PHP to latest version.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.