Welcome! Log In Create A New Profile

Advanced

[BUG?] Nginx hangs when you use try_files, map, request_uri and long url.

Piotr Karbowski
June 18, 2012 03:54PM
Hi,

For some reason, when I use long key with Map Module the whole nginx
seems to hang.

Some background:
I have two backends, say old_app and new_app. both have own named
locations, @new_app and old_app. In order to redirect urls I tried to use:

map $request_uri $map_apps {
default @new_app;
/asd @old_app;
}
try_files /not_exist $map_apps;

And it was working, then I added another key, 70 chars long, with
commas, - and numbers, like "/foo-bar,123,asd-qwe-asdasdasd"

since the keyword have 70 chars I had to change default 64 value of
map_hash_bucket_size, I changed it to 128.

Now, if I access the '/foo-bar,123,asd-qwe-asdasdasd' url, nginx just
hangs, firefox return 'connection reset', wget seems to retry every 3s
with message 'no data'. I cant access any vhost, I cant even stop nginx,
the workers ignore master, when I nginx -s stop, the workers are still
alive, when I kill master with sigTERM, the workers are still alive,
eventualy, after few minutes they starts working and support requests or
just die.

The underlaying system is debian6, nginx version 1.1.19 (from
squeeze-backports), 64bit.

even if I have only default entry in map, and then access the long url,
the nginx hangs, but when I hash-out the map and try_files lines, I can
access the url and see 404 error.

fwiw I tried to use map since I have about 100 URLs that I want to
proxy_pass to old_app, rest have to be handled by new_app.

-- Piotr.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

[BUG?] Nginx hangs when you use try_files, map, request_uri and long url.

Piotr Karbowski June 18, 2012 03:54PM

Re: [BUG?] Nginx hangs when you use try_files, map, request_uri and long url.

Maxim Dounin June 18, 2012 04:04PM

Re: [BUG?] Nginx hangs when you use try_files, map, request_uri and long url.

Piotr Karbowski June 19, 2012 06:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
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