High upstream_response_time in NGINX logs, but the actual time to serve the response from the upstream is low. #188
anuragiitp
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What could cause a high upstream_response_time (55 seconds) when the request completion time in the upstream logs is very low (12 ms)? Multiple requests are facing the same issue intermittently under high load, and it also delays the NGINX health checks.
also when the log line with "referrer:" logged ? for a single request these are getting logged 4-5 times?
{"line":", client: 10.153.61.211, server: , request: "GET /pcontent/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOiIzNDc4NjE0MTMzIiwidXJsIjoiL3AwYXA2Mmwyb2Jmbi8iLCJleHAiOjE3MjYxNDIwNjR9.gV_BtaCRRa-4qP6WGVlNMe_2UCeqIenwTtoz-PQho9k/p0ap62l2obfn/default/data/resources/ha/9c5d0fdad3504d819a9ac6ec4b4dbcee.png HTTP/1.1", host: "xxx.xxxx.com", referrer: "https://xxx.xxx.com/pcontent/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOiIzNDc4NjE0MTMzIiwidXJsIjoiL3AwYXA2Mmwyb2Jmbi8iLCJleHAiOjE3MjYxNDIwNjR9.gV_BtaCRRa-4qP6WGVlNMe_2UCeqIenwTtoz-PQho9k/p0ap62l2obfn/default/index.htm?airspeed=1\u0026capi_player=1\u0026isLive=false\u0026ticket=xxxx\u0026capi_player=1\u0026isSourcePresent=true\u0026isSupported=true\u0026userLanguage=en\u0026init_slide=149\"","source":"stderr","tag":"50ad95c68f84","attrs":{"buildVersion":"dev_12.6.0_5","env":"PROD","instanceID":"i-01863d5697c17fd72","region":"us-west-2","service":"cpscahe"}}
Conf file:
server {
listen 127.0.0.1:9000;
server_name localhost;
allow 127.0.0.1;
deny all;
location = /status {
stub_status on;
access_log off;
}
}
server {
listen 8443;
keepalive_timeout 70;
set_by_lua_block $obscured_session {
local breezesession = ""
local cookie_value = ngx.var.http_cookie
if cookie_value then
local session_value = string.match(cookie_value, "BREEZESESSION=([^;]+)")
if session_value then
breezesession = "****" .. string.sub(session_value, -5)
end
end
return breezesession
}
}
Beta Was this translation helpful? Give feedback.
All reactions