Closed soulbird closed 1 week ago
From your description, the upstream_response_time
is just 0.001 secs, so the time is almost spent on the openresty itself, could you reproduce this issue in an offline environment?
From your description, the
upstream_response_time
is just 0.001 secs, so the time is almost spent on the openresty itself, could you reproduce this issue in an offline environment?
It is not reproducible offline at present. In fact, there is not much traffic online, and the load of the host itself is not high. Maybe I have not found the key point to reproduce it.
You can use OpenResty XRay and check the off-CPU operation. Are there any off-CPU operation in your code ?
You can use OpenResty XRay and check the off-CPU operation. Are there any off-CPU operations in your code?
You can use OpenResty XRay and check the off-CPU operation. Are there any off-CPU operations in your code?
I didn't find any blocking in the code. I tried to use xray to see if off-CPU exists.
hi @zhuizhuhaomeng I tried to submit an application for xray, but it didn't seem to work, help pls
Description
After I upgraded the production environment's Tengine 2.3.2 (Nginx 1.17.3) to OpenResty 1.24.4.2, some requests occasionally received a 499 error. I know this is usually because the client thinks OpenResty takes too long to process the request and actively disconnects. These 499 exception requests are all based on the HTTP/1.1 protocol. I captured some packets, and their situations are basically the same. One of them is:
request header:
It can be seen that the client sent a POST request at 09:29:55. About 2 seconds later, the client sent Fin to disconnect. During this period, OpenResty did not respond with any data. The log of this request recorded on OpenResty:
time_msec corresponds to $msec, which is the time when OpenResty starts to record logs. The converted time is 09:30:00, which is the same as the time when the OpenResty node sends the Fin packet. The time recorded by request_time is 0.258, which means that OpenResty starts processing the request at 09:29:59.
Question
After the OpenResty node receives the POST request, why does it take 4 seconds to process the request? What might have been sent in the meantime?
Key Configuration
Environment
Error Log
There are no obvious error logs. There are no logs related to insufficient number of connections and insufficient keepalive requests.