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 cby wu560130911 - Nginx Mailing List - English