Welcome! Log In Create A New Profile

Advanced

Re: Re: How to control keepalive connections for upstream before the version of 1.15.3

November 19, 2019 09:48PM
I'm use Nginx proxy to tomcat, tomcat have two parameters manage keep alive, first one is keepAliveTimeout : how the connection idle time; second is maxKeepAliveRequests : how the connection reuse counts;

when use Nginx version before the version of 1.15.3, Nginx can't know when tomcat will be close connection, so online have 502 error;

I'm analysis network packages, find have two reasons cause 502 error to occur; but there have same root reason;

fist reason : tomcat keepalive time is arrived and close handle, but nginx don't know that; cause recv() failed (104: Connection reset by peer) while reading response header from upstream;

second reason : tomcat have send tcp fin package , but nginx also send request to it; case upstream prematurely closed connection while reading response header from upstream;

I have adjust the size of keepAliveTimeout, but the problem still occur, because use nginx with version before 1.15.3;

how can I slove this problem?
Subject Author Posted

How to control keepalive connections for upstream before the version of 1.15.3

yf chu February 25, 2019 03:04AM

Re: How to control keepalive connections for upstream before the version of 1.15.3

Maxim Dounin February 25, 2019 07:24AM

Re:Re: How to control keepalive connections for upstream before the version of 1.15.3

yf chu February 25, 2019 08:48AM

Re: Re: How to control keepalive connections for upstream before the version of 1.15.3

Maxim Dounin February 25, 2019 09:44AM

Re: Re: How to control keepalive connections for upstream before the version of 1.15.3

wu560130911 November 19, 2019 09:48PM

Re: Re: How to control keepalive connections for upstream before the version of 1.15.3

Francis Daly November 20, 2019 03:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready