Welcome! Log In Create A New Profile

Advanced

Re: 504 gateway timeouts

Wade Girard
January 05, 2018 07:30AM
Hi Peter,

Thank You.

In my servlet I am making https requests to third party vendors to get data
from them. The requests typically take 4~5 seconds, but every now any then
one of the requests will take more than 60 seconds. So the connection from
the client to nginx to tomcat will remain open, and at 60 seconds nginx is
terminating the request to tomcat, even though the connection from the
third party server to tomcat is still open.

I am also working with the third party vendor to have them see why their
connections sometimes take more than 60 seconds.

Through googling I discovered that adding the settings proxy_send_timeout,
proxy_read_timeout, proxy_connection_timeout, etc... to my location
definition in my conf file could change the timeout to be different
(higher) than the apparent default 60 second timeout. I use a Mac for
development. I added these to my local conf file, and added the long
connection request to test if the settings worked. They did. However they
do not have the same effect for nginx installed on my production Ubuntu
16.x servers. I did not realize that these settings were limited by the OS
that nginx is installed on. Are there are similar settings that will work
for the Ubuntu 16.x OS to achieve the same result?

Wade

On Fri, Jan 5, 2018 at 1:33 AM, Peter Booth <peter_booth@me.com> wrote:

> Wade,
>
> I think that you are asking “hey why isn’t nginx behaving identically on
> MacOS and Linux when create a servlet that invokes Thread.sleep(300000)
> before it returns a response?*.”*
>
> Am I reading you correctly?
>
> A flippant response would be to say: “because OS/X and Linux are different
> OSes that behave differently”
>
> It would probably help us if you explained a little more about your test,
> why the sleep is there and what your goals are?
>
>
> Peter
>
>
> On Jan 4, 2018, at 11:45 PM, Wade Girard <wade.girard@gmail.com> wrote:
>
> I am not sure what is meant by this or what action you are asking me to
> take. The settings, when added to nginx conf file on Mac OS server and
> nginx reloaded take effect immediately and work as expected, the same
> settings when added to nginx conf file on Ubuntu and nginx reloaded have no
> effect at all. What steps can I take to have the proxy in nginx honor these
> timeouts, or what other settings/actions can I take to make this work?
>
> Thanks
>
> On Thu, Jan 4, 2018 at 7:46 PM, Zhang Chao <zchao1995@gmail.com> wrote:
>
>> > The version that is on the ubuntu servers was 1.10.xx. I just updated
>> it to
>> >
>> > nginx version: nginx/1.13.8
>> >
>> > And I am still having the same issue.
>> >
>> > How do I "Try to flush out some output early on so that nginx will know
>> that Tomcat is alive."
>> >
>> > The nginx and tomcat connection is working fine for all
>> requests/responses that take less t
>>
>> Maybe you can flush out the HTTP response headers quickly.
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
>
> --
> Wade Girard
> c: 612.363.0902 <(612)%20363-0902>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
Wade Girard
c: 612.363.0902
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

504 gateway timeouts

Wade Girard December 27, 2017 05:04PM

Re: 504 gateway timeouts

Igal @ Lucee.org December 27, 2017 05:20PM

Re: 504 gateway timeouts

Wade Girard January 04, 2018 08:12AM

Re: 504 gateway timeouts

tokers January 04, 2018 08:48PM

Re: 504 gateway timeouts

Wade Girard January 04, 2018 11:46PM

Re: 504 gateway timeouts

pbooth January 05, 2018 02:36AM

Re: 504 gateway timeouts

Wade Girard January 05, 2018 07:30AM

Re: 504 gateway timeouts

Wade Girard January 09, 2018 01:54PM

Re: 504 gateway timeouts

pbooth January 09, 2018 03:58PM

Re: 504 gateway timeouts

Aziz Rozyev January 09, 2018 07:26PM



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