Welcome! Log In Create A New Profile

Advanced

Don't want http 504's for idempotent requests

January 26, 2017 12:45PM
Hi folks.

I have a REST API behind nginx.

Sometimes we get back an http 504 despite our software being up, and we don't want that, at least not for idempotent requests. We don't want 504's for idempotent requests even if it means waiting a while for a response.

I'd look at the application to see what's taking too long, but it's actually happening for a very simple health check of the API sometimes - all the health check does is return a 200, nothing more.

We tried:

proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;

proxy_next_upstream error;

http {
keepalive_timeout 65;
# We have 8 upstream servers defined.
}

...to no avail.

Also, I tried upgrading our nginx to 1.10.2 , but that didn't appear to help - I'm still getting infrequent 504's.

I'm convinced we're getting 504's in less than 10 minutes, suggesting those 600 second timeouts aren't working as intended.

How can I eliminate http 504's for idempotent requests like GET?

Thanks!
Subject Author Posted

Don't want http 504's for idempotent requests

dstromberg January 26, 2017 12:45PM

Re: Don't want http 504's for idempotent requests

dstromberg February 02, 2017 09:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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