Nginx crash - possibly keepalives
matthieu.tourne at gmail.com
Wed Oct 19 01:32:53 UTC 2011
So in order to try to reproduce the problem locally, I made this debug
This is meant to have 2 nginx chained one to the other.
nginx#1 has proxy_pass to nginx#2 while using keepalives
nginx#2 has mass_chunk on, which for this extreme test will chunk a 15M file
into 10 bytes chunk (in different tcp packets or not).
I wasn't able to reproduce the segfault, but when I'm using
proxy_buffering off it works fine.
But, when I'm using proxy_buffering and proxy_caching (with sendfile on, and
It seems like readv() returns 0, but finalize_request returns NGX_AGAIN.
I'm not sure that test is relevant, and what I'm really benching here. And
if it might not be the tcp layer directly?
But maybe the failure should be explicit.
The behavior was the same with or without the patch. I've also tried various
combination of proxy buffers, sendfile, directio.
Any thoughts ?
On Fri, Oct 14, 2011 at 12:43 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Wed, Oct 12, 2011 at 09:22:41PM +0400, Maxim Dounin wrote:
> > Hello!
> > On Wed, Oct 12, 2011 at 09:32:41AM -0700, Matthieu Tourne wrote:
> > > On Wed, Oct 12, 2011 at 5:20 AM, Maxim Dounin <mdounin at mdounin.ru>
> > >
> > > > Hello!
> > > >
> > > > On Tue, Oct 11, 2011 at 07:53:36PM -0700, Matthieu Tourne wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > After turning on keepalives, we've been seeing one crash pretty
> > > > > consistently.
> > > > > We're running nginx 1.1.5 and here is the backtrace :
> > Ok, it looks like I'm right and all buffers are in busy chain.
> > Likely this happens due to upstream sending response in many small
> > chunks.
> > I'll try to reproduce it here and provide proper fix.
> Please try the attached patch.
> Maxim Dounin
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx