Active connections are growing in regexp-ed location with alias

bodomic nginx-forum на
Пн Май 28 07:39:44 UTC 2012

Hi there,

We've found an undefined behavior in certain condition, tend to consider
this as a bug.
'If alias is used inside a location defined with a regular expression
then such regular expression should contain captures and alias should
refer to these captures (0.7.40)'. If, contrary, we're mistakenly using
a regexp with selection but alias does not contain $1 variable, we're
getting Not Found errors for some random substrings of alias value. More
on that, active connections are growing in this situation until
workers*clients number is reached, and then nginx stops accepting
connections, causing Connection Timed Out on client.

location ~* ^/data_15/hot/(article|news)/([0-9]+)\.htm$ { 
          alias /opt/; 

In error log we can see mostly "open() "/opt/" failed
(2: No such file or directory)", though sometimes path is
'/opt/^P' or
'/opt/^A' or even

OS is Debian 6.0.4
uname -a
Linux frontend-7 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012
x86_64 GNU/Linux

nginx -V
nginx version: nginx/1.0.12
built by gcc 4.4.5 (Debian 4.4.5-8) 
TLS SNI support enabled
configure arguments: --prefix=/ --sbin-path=/usr/sbin/nginx_new
--pid-path=/var/run/ --lock-path=/var/lock/nginx_new.lock
--http-log-path=/var/log/nginx_new/access.log --user=www-data
--group=www-data --with-http_ssl_module --with-http_realip_module
--with-http_gzip_static_module --with-http_image_filter_module
--with-pcre=../../libs/pcre-8.21 --with-zlib=../../libs/zlib-1.2.5
--with-http_dav_module --with-http_stub_status_module

Posted at Nginx Forum:,226895,226895#msg-226895

Подробная информация о списке рассылки nginx-ru