Welcome! Log In Create A New Profile

Advanced

Большая разница между $request_time и $upstream_response_time

Михаил Монашёв
December 10, 2011 05:30AM
Здравствуйте.

В логах вижу иногда разницу почти в секунду между $request_time и
$upstream_response_time . Т.е. бэкенд сгенерил страничку быстро, а
nginx почему-то отдаёт её долго. Странички обычно размером 260-300 кб.
Могут быть уже загзиплены бэкендом (если это nginx) или нет(если
пришли от апача). Гзипование не влияет.

Конфиг вот такой:

worker_processes 10;

error_log /opt/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 16384;
use kqueue;
}

http {

server_names_hash_max_size 8192;

memcached_gzip_flag 2;
gunzip on;

proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
text/plain txt;
image/png png;
image/x-icon ico;
application/x-shockwave-flash swf;
audio/mpeg mp3;
application/x-gzip gz;
}
default_type application/octet-stream;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
send_lowat 12000;
aio sendfile;

ignore_invalid_headers on;

real_ip_header X-Forwarded-For;

gzip on;
gzip_min_length 1100;
gzip_types application/x-javascript text/css text/xml text/plain;

client_body_temp_path /var/tmp/nginx/client_body_temp_path;
client_max_body_size 20m;
client_body_buffer_size 128k;
client_header_timeout 3m;
client_header_buffer_size 2k;
client_body_timeout 3m;
send_timeout 3m;
postpone_output 9176;
keepalive_timeout 75 60;

reset_timedout_connection on;

proxy_redirect off;

proxy_buffers 1024 64k;

proxy_temp_path /var/tmp/nginx/proxy_temp_path;



--
С уважением,
Михаил mailto:postmaster@softsearch.ru

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

Большая разница между $request_time и $upstream_response_time

Михаил Монашёв December 10, 2011 05:30AM

Re: Большая разница между $request_time и $upstream_response_time

Валентин Бартенев December 10, 2011 05:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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