POST causes segfault (502 'upstream prematurely closed connection')

miradev nginx-forum at
Wed Aug 12 16:18:54 MSD 2009

Maxim Dounin Wrote:
> Hello!

[ .. ]
> > The nginx access log file shows a 502 response, and Apache doesn't register a hit.
> >
> > Nginx error log: "upstream prematurely closed connection while reading response header from upstream"]
> > Apache log: "  child pid 5566 exit signal Segmentation fault (11)"

[ .. ]
> .. probably the only part of the investigation
> relevant to this 
> list is what triggers problem and possible
> workarounds (if any).

In my case the cause is what looks like a bug in mod_perl2. The object handling request parameters (Apache2::Request) failed to initialise where expected. I have not been able to create a proper test case for it as it needs a quite specific scenario. If anyone is interested I can email then more details, anything posted on here would be out of context.

Thanks for your time and help.

Posted at Nginx Forum:,4717,4880#msg-4880

More information about the nginx mailing list