Welcome! Log In Create A New Profile

Advanced

Re: (bug?)Timeout when proxy-pass 0 byte file

Maxim Dounin
September 30, 2009 02:52PM
Hello!

On Wed, Sep 30, 2009 at 12:42:52PM +0400, Maxim Dounin wrote:

> On Wed, Sep 30, 2009 at 11:26:59AM +0800, tOmasEn wrote:

[...]

> > the initiall request when there isn't and cache, everything is ok. the
> > following request to same url will wait until timeout.
>
> Ok, so the problem is cache. Thanks, I'm able to reproduce it
> here. I'll take a look later today how to fix it.

Patch.

Maxim Dounin

>
> Maxim Dounin
>
> [...]
>
> >
> > On Tue, Sep 29, 2009 at 10:48 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> >
> > > Hello!
> > >
> > > On Tue, Sep 29, 2009 at 10:08:51PM +0800, tOmasEn wrote:
> > >
> > > > I been expirencing very slow page load when use nginx as frontend(with
> > > > proxy_pass) for a while.
> > > >
> > > > After some test and debug, i found that it always timeout on response
> > > > of 0 byte file.
> > > >
> > > > So i think there might be a bug when nginx running on proxy mode and
> > > > serving 0 byte files. The frontend will consider there should be more
> > > > data and wait until timeout or something like this.
> > >
> > > Could you please provide nginx -V output and debug log?
> > >
> > > Maxim Dounin
> > >
> > > >
> > > > Btw. Nginx is great. Thanks
> > > >
> > > > tomasen
> > > >
> > > > --
> > > > 从我的移动设备发送
> > > >
> > >
> > >
>
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1254336299 -14400
# Node ID 3a18992ceed641398ac911ad7230924ba2f28929
# Parent 7688992d2abb6759b0a91c4b0cf86802d27cbc4a
Cache: send correct special buffer for empty responses.

diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -798,7 +798,7 @@ ngx_http_cache_send(ngx_http_request_t *

size = c->length - c->body_start;
if (size == 0) {
- return rc;
+ return ngx_http_send_special(r, NGX_HTTP_LAST);
}

b->file_pos = c->body_start;
Subject Author Posted

(bug?)Timeout when proxy-pass 0 byte file

tOmasEn September 29, 2009 10:18AM

Re: (bug?)Timeout when proxy-pass 0 byte file

Maxim Dounin September 29, 2009 10:52AM

Re: (bug?)Timeout when proxy-pass 0 byte file

tOmasEn September 29, 2009 11:34PM

Re: (bug?)Timeout when proxy-pass 0 byte file

Maxim Dounin September 30, 2009 04:48AM

Re: (bug?)Timeout when proxy-pass 0 byte file

Maxim Dounin September 30, 2009 02:52PM

Re: (bug?)Timeout when proxy-pass 0 byte file

Maxim Dounin October 01, 2009 05:36PM

Re: (bug?)Timeout when proxy-pass 0 byte file

Maxim Dounin October 02, 2009 10:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready