Welcome! Log In Create A New Profile

Advanced

Re: [Проблема с настройками proxy]

Denis Gabaidulin
August 10, 2011 04:18AM
В логах дословно вот что:

2011/08/10 09:58:05 [error] 26111#0: *133309 upstream timed out (110:
Connection timed out) while reading response header from upstream,
client: x.x.x.67, server: _, request: "POST /notify/UIDL?windowName=1
HTTP/1.1", upstream: "http://x.x.x.164:8080/notify/UIDL?windowName=1",
host: "domain.tld", referrer: "http://domain.tpl/notify/"

Конфиг:

server {
listen 80 default;
client_max_body_size 100m;
server_name _;
server_name_in_redirect off;
server_tokens off;
resolver 127.0.0.1;

if ($host ~* ^(www\.)(.+)) {
set $rawdomain $2;
rewrite ^/(.*)$ http://$rawdomain/$1 permanent;
}

access_log /var/log/nginx/access.log;

location ^~ /notify& {
# access_log off;
proxy_pass http://127.0.0.1:8080; # tomcat
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}


location / {
# access_log off;
proxy_pass http://x.x.x.164:8080; # same tomcat
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}



2011/8/9 Maxim Dounin <mdounin@mdounin.ru>:
> Hello!
>
> On Tue, Aug 09, 2011 at 06:58:22PM +0400, Denis Gabaidulin wrote:
>
>> Nginx проксирует запросы к tomcat. В tomcat есть запросы, которые
>> могут выполняться минуты(и ничего с этим поделать нельзя). Пробовали
>> менять настройки proxy_read_timeout. Например, ставить значение 600.
>> Но nginx ровно через минуту все равно выдает 504 и upstream timed
>> out(110: Connection timed out).
>
> Когда nginx выдаёт "upstream timed out", он ещё и пишет дальше, в
> процессе чего этот таймаут случился.  Если proxy_read_timeout не
> помогает - возможно, таймаут случился "while connecting to
> upstream" или "while sending request to upstream".
>
> Хотя я подозреваю, что проблема не самом деле в том, что
> proxy_read_timeout задавали не там.  Покажите конфиг.
>
> Maxim Dounin
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>

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

[Проблема с настройками proxy]

Denis Gabaidulin August 09, 2011 11:00AM

Re: [Проблема с настройками proxy]

Maxim Dounin August 09, 2011 11:24AM

Re: [Проблема с настройками proxy]

Denis Gabaidulin August 10, 2011 04:18AM

Re: [Проблема с настройками proxy]

Alex Vorona August 10, 2011 05:22AM

Re: [Проблема с настройками proxy]

Denis Gabaidulin August 10, 2011 05:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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