Welcome! Log In Create A New Profile

Advanced

Sporadic long response times with upstream server

February 20, 2019 07:57PM
This is similar to a previous question, but my log data shows the opposite problem. I am seeing rare requests that take perhaps 3s or more, but typical response times are 100ms or less. This is the log entry for one of the problematic responses:

LOAD_BALANCER_IP - - [20/Feb/2019:13:36:12 +0000] "POST /DevicePost HTTP/1.1" 200 16 "-" "-" "client-ip-redacted" 3.052 0.002 .

Here is the log format:

log_format timed_main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$request_time $upstream_response_time $pipe';

The 0.002 matches what the Node.js logs are reporting from the upstream server, and 3.052 matches what the Elastic Load Balancer is reporting as the response time is recorded. This was set up by AWS Elastic Beanstalk as the (mostly) default configuration for a Node.js application. The only changes were for this logging entry, and manually setting the Content-Type header (the client is an embedded device and their HTTP library doesn't include this header, which creates problems for Node.js Express).

I think this indicates a delay in Node.js, but it is sporadic and I cannot tell if it is some kind of garbage collection, a caching problem (there should be no caching), or something else. Any help would be appreciated.

(I'm sorry I don't know how to format the quotes. I can't find any instructions on what the admin called "quoting conventions typically used on mailing lists" in the post "Please Read Before Posting in this Forum").
Subject Author Posted

Sporadic long response times with upstream server

joncard February 20, 2019 07:57PM

Re: Sporadic long response times with upstream server

joncard February 21, 2019 02:51AM

Re: Sporadic long response times with upstream server

Peter Booth via nginx February 21, 2019 03:52AM

Re: Sporadic long response times with upstream server

joncard February 22, 2019 04:08PM

Re: Sporadic long response times with upstream server

Igor A. Ippolitov February 21, 2019 05:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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