there is my nginx config
log_format main '$time_iso8601 [$request] $body_bytes_sent $status $request_time $upstream_response_time $upstream_connect_time $upstream_header_time';
upstream helloworld {
server localhost:8080;
}
server {
listen 80;
access_log logs/access.log main;
location / {
proxy_pass http://helloworld;
}
}
there is my nginx log
2023-04-27T00:27:34+07:00 [POST /v1/config/test HTTP/1.1] 0 499 9.060 - - -
2023-04-27T00:28:04+07:00 [POST /v1/config/test HTTP/1.1] 0 499 0.024 - - -
2023-04-27T00:28:10+07:00 [POST /v1/config/test HTTP/1.1] 0 499 0.000 - - -
2023-04-27T00:29:01+07:00 [POST /v1/config/test HTTP/1.1] 0 499 81.496 - - -
... others
The meaning of the 499 status code is that the server has not responded yet, but the client has actively disconnected.(Perhaps the server is too slow and the client can't wait anymore)
My understanding of the first line of logs is as follows:
The client waited for at least 9.060 seconds, but the server did not respond, The client couldn't wait, so the client proactively disconnected. I want to know why nginx did not access upstream within these 9.060 seconds.
I want to know what nginx is doing in these 9.060 seconds