Bug while using "proxy_cache_use_stale updating"

Igor Sysoev is at rambler-co.ru
Fri Aug 28 20:43:36 MSD 2009


On Fri, Aug 28, 2009 at 03:57:04PM +0200, J?r?me Loyet wrote:

> Le 28 ao?t 2009 13:59, J?r?me Loyet<jerome at loyet.net> a ?crit :
> > 2009/8/27 icqheretic <nginx-forum at nginx.us>:
> >> Hi Jerome, I may be hitting a similar issue with 0.8.10.
> >
> > I confirm that the bug is having a similar issue with 0.8.10. I've
> > just tested it.
> >
> > By the way, the bug does not appear if I add 404 page to
> > proxy_cache_valid directive:
> >
> >  proxy_cache_valid 200 302 404 30s;
> >
> > An other solution is to remove the "updating" option for the
> > "proxy_cache_use_stale" directive.
> >
> > I'm looking into the code to try to find a solution.
> 
> After several trials, I made a patch. This seems to correct the issue.
> Hope no other bugs are implied buy this diff:
> 
> --- src/http/ngx_http_upstream.c.orig   2009-08-23 18:10:39.000000000 +0200
> +++ src/http/ngx_http_upstream.c        2009-08-28 15:54:43.000000000 +0200
> @@ -2574,6 +2574,8 @@
>              } else if (p->upstream_error) {
>                  ngx_http_file_cache_free(r, u->pipe->temp_file);
>              }
> +        } else {
> +            ngx_http_file_cache_free(r, u->pipe->temp_file);
>          }
> 
>  #endif

No, this is not correct fix. I will look this.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list