<div dir="ltr">We are running Nginx and upstream on the same machine using docker, so there's no firewall.<br><br>I did a test locally and captured the network packages.<br><br>For the normal requests, upstream send a [FIN, ACK] to nginx after keep-alive timeout (500 ms), and nginx also send a [FIN, ACK] back, then upstream send a [ACK] to close the connection completely.<br><div><div style="box-sizing:inherit;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px"><div class="gmail-syntaxhighlighter gmail-javascript" style="box-sizing:inherit;width:1057px;margin:1em 0px;overflow:auto;font-size:1em"><table border="0" cellpadding="0" cellspacing="0" style="table-layout:inherit;width:2067px;box-sizing:content-box;border:0px;margin:0px;border-radius:0px;background:none rgb(242,242,242);float:none;height:auto;line-height:1.1em;outline:0px;overflow:visible;padding:0.5em 0px;vertical-align:baseline;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;font-size:1em;min-height:auto"><tbody style="box-sizing:content-box;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;font-size:1em;min-height:auto"><tr style="box-sizing:content-box;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;font-size:1em;min-height:auto"><td class="gmail-gutter" style="box-sizing:content-box;border:0px;padding:0px;border-radius:0px;background:none;float:none;height:auto;line-height:1.1em;outline:0px;overflow:visible;vertical-align:baseline;width:auto;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;font-size:1em;min-height:auto;color:rgb(175,175,175)"><div class="gmail-line gmail-number1 gmail-index0 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">1</div><div class="gmail-line gmail-number2 gmail-index1 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">2</div><div class="gmail-line gmail-number3 gmail-index2 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">3</div><div class="gmail-line gmail-number4 gmail-index3 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">4</div><div class="gmail-line gmail-number5 gmail-index4 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">5</div><div class="gmail-line gmail-number6 gmail-index5 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">6</div><div class="gmail-line gmail-number7 gmail-index6 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">7</div><div class="gmail-line gmail-number8 gmail-index7 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">8</div><div class="gmail-line gmail-number9 gmail-index8 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">9</div><div class="gmail-line gmail-number10 gmail-index9 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">10</div><div class="gmail-line gmail-number11 gmail-index10 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">11</div></td><td class="gmail-code" style="width:2020px;box-sizing:content-box;border:0px;padding:0px;border-radius:0px;background:none;float:none;height:auto;line-height:1.1em;outline:0px;overflow:visible;vertical-align:baseline;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;font-size:1em;min-height:auto"><div class="gmail-container" style="box-sizing:content-box;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;font-size:1em;min-height:auto"><div class="gmail-line gmail-number1 gmail-index0 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">No. Time Source Destination Protocol Length Info</code></div><div class="gmail-line gmail-number2 gmail-index1 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">1 2017-11-12 17:11:04.299146 172.18.0.3 172.18.0.2 TCP 74 48528 → 8000 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=32031305 TSecr=0 WS=128</code></div><div class="gmail-line gmail-number3 gmail-index2 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">2 2017-11-12 17:11:04.299171 172.18.0.2 172.18.0.3 TCP 74 8000 → 48528 [SYN, ACK] Seq=0 Ack=1 Win=28960 Len=0 MSS=1460 SACK_PERM=1 TSval=32031305 TSecr=32031305 WS=128</code></div><div class="gmail-line gmail-number4 gmail-index3 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">3 2017-11-12 17:11:04.299194 172.18.0.3 172.18.0.2 TCP 66 48528 → 8000 [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=32031305 TSecr=32031305</code></div><div class="gmail-line gmail-number5 gmail-index4 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">4 2017-11-12 17:11:04.299259 172.18.0.3 172.18.0.2 HTTP 241 GET /_healthcheck HTTP/1.1 </code></div><div class="gmail-line gmail-number6 gmail-index5 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">5 2017-11-12 17:11:04.299267 172.18.0.2 172.18.0.3 TCP 66 8000 → 48528 [ACK] Seq=1 Ack=176 Win=30080 Len=0 TSval=32031305 TSecr=32031305</code></div><div class="gmail-line gmail-number7 gmail-index6 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">6 2017-11-12 17:11:04.299809 172.18.0.2 172.18.0.3 HTTP 271 HTTP/1.1 200 OK (text/html)</code></div><div class="gmail-line gmail-number8 gmail-index7 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">7 2017-11-12 17:11:04.299852 172.18.0.3 172.18.0.2 TCP 66 48528 → 8000 [ACK] Seq=176 Ack=206 Win=30336 Len=0 TSval=32031305 TSecr=32031305</code></div><div class="gmail-line gmail-number9 gmail-index8 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">8 2017-11-12 17:11:04.800805 172.18.0.2 172.18.0.3 TCP 66 8000 → 48528 [FIN, ACK] Seq=206 Ack=176 Win=30080 Len=0 TSval=32031355 TSecr=32031305</code></div><div class="gmail-line gmail-number10 gmail-index9 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">9 2017-11-12 17:11:04.801120 172.18.0.3 172.18.0.2 TCP 66 48528 → 8000 [FIN, ACK] Seq=176 Ack=207 Win=30336 Len=0 TSval=32031355 TSecr=32031355</code></div><div class="gmail-line gmail-number11 gmail-index10 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">10 2017-11-12 17:11:04.801151 172.18.0.2 172.18.0.3 TCP 66 8000 → 48528 [ACK] Seq=207 Ack=177 Win=30080 Len=0 TSval=32031355 TSecr=32031355</code></div></div></td></tr></tbody></table></div></div><p style="box-sizing:inherit;margin:0px 0px 1em;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px"></p><div style="box-sizing:inherit"><div class="gmail-syntaxhighlighter gmail-javascript" style="box-sizing:inherit;width:1057px;margin:1em 0px;overflow:auto"><br></div><div class="gmail-syntaxhighlighter gmail-javascript" style="box-sizing:inherit;width:1057px;margin:1em 0px;overflow:auto">For the failed requests, upstream received a new http request when it had closed the connection after keep-alive timeout (500 ms) and hasn’t got a chance to send the [FIN] package. Because of the connection has been closed from upstream’s perspective, so it send a [RST] response for this request.<table border="0" cellpadding="0" cellspacing="0" style="color:rgb(51,51,51);font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;font-size:1em;table-layout:inherit;width:2067px;box-sizing:content-box;border:0px;margin:0px;border-radius:0px;background:none rgb(242,242,242);float:none;height:auto;line-height:1.1em;outline:0px;overflow:visible;padding:0.5em 0px;vertical-align:baseline;min-height:auto"><tbody style="box-sizing:content-box;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;font-size:1em;min-height:auto"><tr style="box-sizing:content-box;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;font-size:1em;min-height:auto"><td class="gmail-gutter" style="box-sizing:content-box;border:0px;padding:0px;border-radius:0px;background:none;float:none;height:auto;line-height:1.1em;outline:0px;overflow:visible;vertical-align:baseline;width:auto;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;font-size:1em;min-height:auto;color:rgb(175,175,175)"><div class="gmail-line gmail-number1 gmail-index0 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">1</div><div class="gmail-line gmail-number2 gmail-index1 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">2</div><div class="gmail-line gmail-number3 gmail-index2 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">3</div><div class="gmail-line gmail-number4 gmail-index3 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">4</div><div class="gmail-line gmail-number5 gmail-index4 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">5</div><div class="gmail-line gmail-number6 gmail-index5 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">6</div><div class="gmail-line gmail-number7 gmail-index6 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">7</div><div class="gmail-line gmail-number8 gmail-index7 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">8</div><div class="gmail-line gmail-number9 gmail-index8 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">9</div><div class="gmail-line gmail-number10 gmail-index9 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">10</div><div class="gmail-line gmail-number11 gmail-index10 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">11</div><div class="gmail-line gmail-number12 gmail-index11 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">12</div><div class="gmail-line gmail-number13 gmail-index12 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border-width:0px 3px 0px 0px;border-top-style:initial;border-right-style:solid;border-bottom-style:initial;border-left-style:initial;border-top-color:initial;border-right-color:rgb(108,226,108);border-bottom-color:initial;border-left-color:initial;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 0.5em 0px 1em;text-align:right;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre">13</div></td><td class="gmail-code" style="width:2020px;box-sizing:content-box;border:0px;padding:0px;border-radius:0px;background:none;float:none;height:auto;line-height:1.1em;outline:0px;overflow:visible;vertical-align:baseline;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;font-size:1em;min-height:auto"><div class="gmail-container" style="box-sizing:content-box;border-radius:0px;background:none;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;font-size:1em;min-height:auto"><div class="gmail-line gmail-number1 gmail-index0 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">No. Time Source Destination Protocol Length Info</code></div><div class="gmail-line gmail-number2 gmail-index1 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">433 2017-11-12 17:11:26.548449 172.18.0.3 172.18.0.2 TCP 74 48702 → 8000 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=32033530 TSecr=0 WS=128</code></div><div class="gmail-line gmail-number3 gmail-index2 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">434 2017-11-12 17:11:26.548476 172.18.0.2 172.18.0.3 TCP 74 8000 → 48702 [SYN, ACK] Seq=0 Ack=1 Win=28960 Len=0 MSS=1460 SACK_PERM=1 TSval=32033530 TSecr=32033530 WS=128</code></div><div class="gmail-line gmail-number4 gmail-index3 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">435 2017-11-12 17:11:26.548502 172.18.0.3 172.18.0.2 TCP 66 48702 → 8000 [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=32033530 TSecr=32033530</code></div><div class="gmail-line gmail-number5 gmail-index4 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">436 2017-11-12 17:11:26.548609 172.18.0.3 172.18.0.2 HTTP 241 GET /_healthcheck HTTP/1.1 </code></div><div class="gmail-line gmail-number6 gmail-index5 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">437 2017-11-12 17:11:26.548618 172.18.0.2 172.18.0.3 TCP 66 8000 → 48702 [ACK] Seq=1 Ack=176 Win=30080 Len=0 TSval=32033530 TSecr=32033530</code></div><div class="gmail-line gmail-number7 gmail-index6 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">438 2017-11-12 17:11:26.549173 172.18.0.2 172.18.0.3 HTTP 271 HTTP/1.1 200 OK (text/html)</code></div><div class="gmail-line gmail-number8 gmail-index7 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">439 2017-11-12 17:11:26.549230 172.18.0.3 172.18.0.2 TCP 66 48702 → 8000 [ACK] Seq=176 Ack=206 Win=30336 Len=0 TSval=32033530 TSecr=32033530</code></div><div class="gmail-line gmail-number9 gmail-index8 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">440 2017-11-12 17:11:27.049668 172.18.0.3 172.18.0.2 HTTP 241 GET /_healthcheck HTTP/1.1 </code></div><div class="gmail-line gmail-number10 gmail-index9 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">441 2017-11-12 17:11:27.050324 172.18.0.2 172.18.0.3 HTTP 271 HTTP/1.1 200 OK (text/html)</code></div><div class="gmail-line gmail-number11 gmail-index10 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">442 2017-11-12 17:11:27.050378 172.18.0.3 172.18.0.2 TCP 66 48702 → 8000 [ACK] Seq=351 Ack=411 Win=31360 Len=0 TSval=32033580 TSecr=32033580</code></div><div class="gmail-line gmail-number12 gmail-index11 gmail-alt1" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">443 2017-11-12 17:11:27.551182 172.18.0.3 172.18.0.2 HTTP 241 GET /_healthcheck HTTP/1.1 </code></div><div class="gmail-line gmail-number13 gmail-index12 gmail-alt2" style="box-sizing:content-box;border-radius:0px;background-image:none;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;padding:0px 1em;vertical-align:baseline;width:auto;font-size:1em;min-height:auto;white-space:pre"><code class="gmail-javascript gmail-spaces" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto"> </code><code class="gmail-javascript gmail-plain" style="box-sizing:content-box;font-size:1em;font-family:Consolas,"Bitstream Vera Sans Mono","Courier New",Courier,monospace;background:none;padding:0px;border-radius:0px;border:0px;float:none;height:auto;line-height:1.1em;margin:0px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:auto;color:black">444 2017-11-12 17:11:27.551294 172.18.0.2 172.18.0.3 TCP 66 8000 → 48702 [RST, ACK] Seq=411 Ack=526 Win=32256 Len=0 TSval=32033630 TSecr=32033630</code></div></div></td></tr></tbody></table></div></div><p style="box-sizing:inherit;margin:0px 0px 1em;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px">When nginx receives the [RST] package, it will log a ‘Connection reset’ error.</p><p style="box-sizing:inherit;margin:0px 0px 1em;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px">I'm testing by set up the environment:</p><p style="box-sizing:inherit;margin:0px 0px 1em;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px">Upstream (Node.js server):</p><ul style="box-sizing:inherit;margin:0px 0px 1.75em;padding:0px 0px 0px 2em;list-style-position:initial;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px"><li style="box-sizing:inherit">Set keep-alive timeout to 500 ms</li></ul><p style="box-sizing:inherit;margin:0px 0px 1em;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px">Test client:</p><ul style="box-sizing:inherit;margin:0px 0px 1.75em;padding:0px 0px 0px 2em;list-style-position:initial;color:rgb(51,51,51);font-family:Merriweather,Georgia,serif;font-size:16px"><li style="box-sizing:inherit">Keep sending requests with an interval</li><li style="box-sizing:inherit">Interval starts from 500 ms and decrease 0.1 ms after each request</li></ul><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px">For more detailed description of the test process, you can reference my post at: <a href="https://theantway.com/2017/11/analyze-connection-reset-error-in-nginx-upstream-with-keep-alive-enabled/">https://theantway.com/2017/11/analyze-connection-reset-error-in-nginx-upstream-with-keep-alive-enabled/</a></span></font></div></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px"><br></span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px">To Fix the issue, I tried to add a timeout for keep-alived upstream, and you can check the patch at: <a href="https://github.com/weixu365/nginx/blob/docker-1.13.6/docker/stretch/patches/01-http-upstream-keepalive-timeout.patch">https://github.com/weixu365/nginx/blob/docker-1.13.6/docker/stretch/patches/01-http-upstream-keepalive-timeout.patch</a></span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px"><br></span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px">The patch is for my current testing, and I can create a different format if you need.</span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px"><br></span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px">Regards</span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px"><br></span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px">Wei Xu</span></font></div><div><font color="#333333" face="Merriweather, Georgia, serif"><span style="font-size:16px"><br></span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 10, 2017 at 4:07 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Thu, Nov 02, 2017 at 08:41:16PM +1100, Wei Xu wrote:<br>
<br>
> Hi<br>
> I saw there's an issue talking about "implement keepalive timeout for<br>
</span>> upstream <<a href="https://trac.nginx.org/nginx/ticket/1170" rel="noreferrer" target="_blank">https://trac.nginx.org/nginx/<wbr>ticket/1170</a>>".<br>
<span class="">><br>
> I have a different scenario for this requirement.<br>
><br>
> I'm using Node.js web server as upstream, and set keep alive time out to 60<br>
> second in nodejs server. The problem is I found more than a hundred<br>
> "Connection reset by peer" errors everyday.<br>
><br>
> Because there's no any errors on nodejs side, I guess it was because of the<br>
> upstream has disconnected, and at the same time, nginx send a new request,<br>
> then received a TCP RST.<br>
<br>
</span>Could you please trace what actually happens on the network level<br>
to confirm the guess is correct?<br>
<br>
Also, please check that there are no stateful firewalls between<br>
nginx and the backend. A firewall which drops the state before<br>
the timeout expires looks like a much likely cause for such<br>
errors.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer" target="_blank">http://mdounin.ru/</a><br>
______________________________<wbr>_________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-devel</a><br>
</font></span></blockquote></div><br></div>