﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
130	proxy_cache_lock does not work as expected	openid.yandex.ru/pixelbender	somebody	"The Problem
===========

Seems proxy_cache_lock does not work as expected


File: default
=============

server {
	listen 80;
	location / {
		proxy_pass http://localhost:8080/index.php;
		proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
		proxy_cache_valid 5s;
		proxy_cache cache;
		proxy_ignore_client_abort on;
		proxy_cache_key $request_uri$host;
		proxy_cache_lock on;
		proxy_cache_lock_timeout 10m;
	}
}



File: index.php
===============

<?php
usleep(rand(10000, 20000));
echo rand(0,1000000000);
?>


Output
======

Different results: 1 (+101061301)
Different results: 2 (+657023466)
Different results: 3 (+499714216)
Different results: 4 (+277901683)
Different results: 5 (+317902436)
Different results: 6 (+896635636)
Different results: 7 (+463205066)
Different results: 8 (+753108359)
Different results: 9 (+656662217)
Different results: 10 (+350354652)
Different results: 11 (+428192035)
Different results: 12 (+382234339)
Different results: 13 (+735190009)
Different results: 14 (+124753595)
Different results: 15 (+156651065)
Different results: 16 (+468289203)
Different results: 17 (+131853834)
Different results: 18 (+107945026)
Different results: 19 (+66802585)
Different results: 20 (+112003177)
Different results: 21 (+216053443)
Different results: 22 (+900513314)
Different results: 23 (+653193969)
Different results: 24 (+325815718)
...
(execution time is less than 1 second)



Expected output
===============

Different results: 1 (+101061301)
Different results: 2 (+657023466)
(1 or 2 output lines)


"	defect	closed	minor		nginx-module	1.1.x	invalid	proxy cache lock proxy_cache_lock		Linux virtualbox 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux	"
nginx version: nginx/1.1.14
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd-nginx_1.1.14-1~bpo60+1-i386-SwftRi/nginx-1.1.14/debian/modules/nginx-echo --add-module=/build/buildd-nginx_1.1.14-1~bpo60+1-i386-SwftRi/nginx-1.1.14/debian/modules/nginx-upstream-fair"
