ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: post_action crash



А я именно точно урл записываю в post_action :-) Для всего остального
(миллион реврайтов и тп фигни) работает. Да и прав Максим - корок быть
не должно никогда.

2010/1/14 Kruglov Eugenie <ekruglov@xxxxxxxxx>:
> Есть чёткое ощущение именно Вашей ошибки. Когда Вы пишите "location =" - он
> воспрнимается именно как локейшн с точным урлом. Именованный локейшн должен
> записываться так: "location @named".
>
> Так что - попробуйте.
>
> 2010/1/14 Alexey Kovyrin <alexey@xxxxxxxxxxx>
>>
>> Честно говоря, лениво :-) работает и так. Просто решил, что лучше
>> напомнить Игорю о том, что баг таки есть. Мне просто пробовать сейчас
>> - это мучать продакшн-машины, а это не гуд.
>>
>> 2010/1/14 Kruglov Eugenie <ekruglov@xxxxxxxxx>:
>> > А попробуйте задать его так:
>> > location  @analytics_docview {
>> >    ...
>> > }
>> >
>> > 2010/1/14 Alexey Kovyrin <alexey@xxxxxxxxxxx>
>> >>
>> >> Доброго всем времени суток,
>> >>
>> >> Вот, больше года спустя, копаясь в конфигах удивился, почему экшн не
>> >> internal.... сменил и БАЦ - 5 минут даунтайма :-) Когда заглянул в
>> >> кору, сразу вспомнил баг. Вот только чего-то мне думалось, что с
>> >> 0.6.34 до 0.7.64 его починили. Игорь, личная просьба, глянь на него
>> >> плиз :-)
>> >>
>> >> 2008/12/11 Alexey Kovyrin <alexey@xxxxxxxxxxx>:
>> >> > Решил тут заюзать post_action, чтобы после отдачи страницы документа
>> >> > юзеру дергать наш сервер аналитики (раньше дергал с бекенда, но щас
>> >> > приделали squid перед ним - не выходит, так как 90% запросов отдаются
>> >> > из кеша).
>> >> >
>> >> > Сделал вот так:
>> >> >
>> >> >    location = @analytics_docview {
>> >> >        internal;
>> >> >
>> >> >        proxy_set_header  X-Analytics-page_type 'document';
>> >> >        proxy_set_header  X-Analytics-docview_uri $docview_uri;
>> >> >        proxy_set_header  X-Analytics-referer $http_referer;
>> >> >        proxy_set_header  X-Analytics-user_agent $http_user_agent;
>> >> >        proxy_set_header  X-Analytics-user_ip $remote_addr;
>> >> >
>> >> >        proxy_connect_timeout 5;
>> >> >        proxy_read_timeout 5;
>> >> >        proxy_send_timeout 5;
>> >> >
>> >> >        access_log logs/analytics-api.log main;
>> >> >        error_log logs/analytics-api.error.log debug;
>> >> >
>> >> >        proxy_pass http://XXXXXXX:4000/collector/register_hit;
>> >> >    }
>> >> >
>> >> >    # Distribute queries among different mongrel packs
>> >> >    # DOCVIEW page - with caching
>> >> >    location /doc/ {
>> >> >        access_log logs/scribd.analytics.log analytics;
>> >> >        add_header X-Served-By backend;
>> >> >
>> >> >        set $docview_uri $uri;
>> >> >        post_action @analytics_docview;
>> >> >        ..........................................
>> >> >        ... много всего, в основном
>> >> >        ... proxy_pass'ы всякие
>> >> >        ..........................................
>> >> >    }
>> >> >
>> >> >
>> >> >
>> >> > Результат оказался странным:
>> >> >
>> >> > 1) В еррор логе:
>> >> >
>> >> > 2008/12/11 02:20:38 [error] 7402#0: *36 could not find named location
>> >> > "@analytics_docview" while sending to client, client: 66.249.90.136,
>> >> > s
>> >> > erver: *.scribd.com, request: "GET
>> >> > /doc/10536/PAN-F49A?query2=WWW.tininfo%40nsdl.co.in HTTP/1.0",
>> >> > upstream: "http://10.10.170.18:8080/doc/10
>> >> > 536/PAN-F49A?query2=WWW.tininfo%40nsdl.co.in", host: "www.scribd.com"
>> >> >
>> >> > 2) проверял на трафике в 50+ QPS и за 10-15 секунд получил десяток
>> >> > core-файлов :-/
>> >> >
>> >> > Core was generated by `nginx: worker process       '.
>> >> > Program terminated with signal 11, Segmentation fault.
>> >> > #0  0x0000000000409e3c in ngx_vsnprintf (buf=0x7fff5291f12c "?*",
>> >> > max=<value optimized out>, fmt=<value optimized out>,
>> >> >    args=0x7fff5291f030) at src/core/ngx_string.c:426
>> >> > 426                         *--p = (u_char) (ui32 % 10 + '0');
>> >> > (gdb) bt
>> >> > #0  0x0000000000409e3c in ngx_vsnprintf (buf=0x7fff5291f12c "?*",
>> >> > max=<value optimized out>, fmt=<value optimized out>,
>> >> >    args=0x7fff5291f030) at src/core/ngx_string.c:426
>> >> > #1  0x000000000040a219 in ngx_snprintf (buf=0x7fff5291f12c "?*",
>> >> > max=140734578683891, fmt=0x2ff <Address 0x2ff out of bounds>)
>> >> >    at src/core/ngx_string.c:100
>> >> > #2  0x0000000000406353 in ngx_log_error_core (level=4, log=0x7d2f00,
>> >> > err=0, fmt=0x45e090 "could not find named location \"%V\"")
>> >> >    at src/core/ngx_log.c:98
>> >> > #3  0x000000000042901b in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1934
>> >> > #4  0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > #5  0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > #6  0x0000000000429028 in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1937
>> >> > #7  0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > #8  0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > #9  0x0000000000429028 in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1937
>> >> > #10 0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > #11 0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > #12 0x0000000000429028 in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1937
>> >> > #13 0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > #14 0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > #15 0x0000000000429028 in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1937
>> >> > #16 0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > #17 0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > #18 0x0000000000429028 in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1937
>> >> > #19 0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > .............
>> >> > ............тут очень много одинаковых блоков вызовов (злобная такая
>> >> > рекурсия)
>> >> > ............
>> >> > #39500 0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > #39501 0x0000000000429028 in ngx_http_named_location (r=0x700640,
>> >> > name=0x671d40) at src/http/ngx_http_core_module.c:1937
>> >> > #39502 0x000000000042b560 in ngx_http_post_action (r=0x700640) at
>> >> > src/http/ngx_http_request.c:2560
>> >> > #39503 0x000000000042cd35 in ngx_http_finalize_request (r=0x700640,
>> >> > rc=500) at src/http/ngx_http_request.c:1706
>> >> > ---Type <return> to continue, or q <return> to quit---
>> >> >
>> >> > Дальше мне надоело жать ентер :-)
>> >> >
>> >> > Внимание, вопрос: что делать? :-(
>> >> >
>> >> > --
>> >> > Alexey Kovyrin
>> >> > http://kovyrin.info/
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Alexey Kovyrin
>> >> http://kovyrin.net/
>> >> _______________________________________________
>> >> nginx-ru mailing list
>> >> nginx-ru@xxxxxxxxx
>> >> http://nginx.org/mailman/listinfo/nginx-ru
>> >
>> >
>> >
>> > --
>> > Faithfully yours, Eugenie
>> > ICQ #701217
>> > GTalk ekruglov@xxxxxxxxx
>> >
>> > _______________________________________________
>> > nginx-ru mailing list
>> > nginx-ru@xxxxxxxxx
>> > http://nginx.org/mailman/listinfo/nginx-ru
>> >
>> >
>>
>>
>>
>> --
>> Alexey Kovyrin
>> http://kovyrin.net/
>> _______________________________________________
>> nginx-ru mailing list
>> nginx-ru@xxxxxxxxx
>> http://nginx.org/mailman/listinfo/nginx-ru
>
>
>
> --
> Faithfully yours, Eugenie
> ICQ #701217
> GTalk ekruglov@xxxxxxxxx
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@xxxxxxxxx
> http://nginx.org/mailman/listinfo/nginx-ru
>
>



-- 
Alexey Kovyrin
http://kovyrin.net/
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.