<div dir="ltr"><div>HI,</div><div><br></div><div>We were using the tool from <b><a href="https://github.com/fstab/h2c">https://github.com/fstab/h2c</a> </b>and seeing change in behaviour between 1.18 and 1.20+ wrt client_header_timeout configuration.</div><div>We suspect change
<a class="ext-link" href="https://github.com/nginx/nginx/commit/0f5d0c5798eacb60407bcf0a76fc0b2c39e356bb"><span class="gmail-icon"></span>https://github.com/nginx/nginx/commit/0f5d0c5798eacb60407bcf0a76fc0b2c39e356bb</a> causing this change in behaviour.</div><div>Can we get some thoughts on this ?<br></div><div> </div><div>Scenario:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre class="gmail-wiki"><b>With nginx 1.20+ <br></b></pre><pre class="gmail-wiki"><b># h2c connect https://<IP>:449; while true; do sleep 1;h2c ping;done</b>
[2024-02-14 15:35:13] -> SETTINGS(0)
[2024-02-14 15:35:13] <- SETTINGS(0)
[2024-02-14 15:35:13] <- WINDOW_UPDATE(0)
[2024-02-14 15:35:13] -> SETTINGS(0)
[2024-02-14 15:35:13] <- SETTINGS(0)
[2024-02-14 15:35:14] -> PING(0)
[2024-02-14 15:35:14] <- PING(0)
[2024-02-14 15:35:15] -> PING(0)
[2024-02-14 15:35:15] <- PING(0)
[2024-02-14 15:35:16] -> PING(0)
[2024-02-14 15:35:16] <- PING(0)
[2024-02-14 15:35:17] -> PING(0)
[2024-02-14 15:35:17] <- PING(0)
[2024-02-14 15:35:18] -> PING(0)
[2024-02-14 15:35:18] <- PING(0)
[2024-02-14 15:35:19] -> PING(0)
[2024-02-14 15:35:19] <- PING(0)
[2024-02-14 15:35:20] -> PING(0)
[2024-02-14 15:35:20] <- PING(0)
[2024-02-14 15:35:21] -> PING(0)
[2024-02-14 15:35:21] <- PING(0)
[2024-02-14 15:35:22] -> PING(0)
[2024-02-14 15:35:22] <- PING(0)
[2024-02-14 15:35:23] -> PING(0)
[2024-02-14 15:35:23] <- PING(0)
[2024-02-14 15:35:24] -> PING(0)
[2024-02-14 15:35:24] <- PING(0)
[2024-02-14 15:35:25] -> PING(0)
[2024-02-14 15:35:25] <- PING(0)
[2024-02-14 15:35:26] -> PING(0)
[2024-02-14 15:35:26] <- PING(0)
[2024-02-14 15:35:27] -> PING(0)
[2024-02-14 15:35:27] <- PING(0)
[2024-02-14 15:35:28] -> PING(0)
[2024-02-14 15:35:28] <- PING(0)
[2024-02-14 15:35:29] -> PING(0)
[2024-02-14 15:35:29] <- PING(0)
[2024-02-14 15:35:30] -> PING(0)
[2024-02-14 15:35:30] <- PING(0)
[2024-02-14 15:35:31] -> PING(0)
[2024-02-14 15:35:31] <- PING(0)
[2024-02-14 15:35:32] -> PING(0)
[2024-02-14 15:35:32] <- PING(0)
[2024-02-14 15:35:33] -> PING(0)
[2024-02-14 15:35:33] <- PING(0)
[2024-02-14 15:35:34] -> PING(0)
[2024-02-14 15:35:34] <- PING(0)
Error while reading next frame: EOF
[2024-02-14 15:35:35] <- GOAWAY(0) << exactly 22s (client_header_timeout set to 22s)
</pre></blockquote><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre class="gmail-wiki">TEST 2 (with nginx 1.18)
<b>h2c connect https://<IP>:449; while true; do sleep 1;h2c ping; done </b>
[2024-02-14 15:46:18] -> SETTINGS(0)
[2024-02-14 15:46:18] <- SETTINGS(0)
[2024-02-14 15:46:18] <- WINDOW_UPDATE(0)
[2024-02-14 15:46:18] -> SETTINGS(0)
[2024-02-14 15:46:18] <- SETTINGS(0)
[2024-02-14 15:47:18] -> PING(0)
[2024-02-14 15:47:18] <- PING(0)
[2024-02-14 15:48:18] -> PING(0)
[2024-02-14 15:48:18] <- PING(0)
[2024-02-14 15:49:18] -> PING(0)
[2024-02-14 15:49:18] <- PING(0)
[2024-02-14 15:50:19] -> PING(0)
[2024-02-14 15:50:19] <- PING(0)
[2024-02-14 15:51:19] -> PING(0)
[2024-02-14 15:51:19] <- PING(0)
[2024-02-14 15:52:19] -> PING(0)
[2024-02-14 15:52:19] <- PING(0)
--> We are not seeing connection being closed, with client_header_timeout set to 22s.</pre>
</blockquote><div><br></div><div><b><u>Queries:</u></b><br></div><div>How can we achieve the same behaviour of 1.18 in 1.20+ ? Is it possible to achieve it ?</div><div><br></div><div>Also what is the difference between keepalive_timeout and client_header_timeout ? <br></div><div><br></div><div>In nginx 1.20+, we are seeing keepalive_timeout closing the connection before client_header_timeout for below config and it was not the same case in 1.18.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">keepalive_timeout 10s;</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">client_header_timeout 22s;</blockquote><div><br></div><div><br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="'trebuchet ms', sans-serif" color="#000099" size="1"><b>Thanks & Regards,</b></font><div><font face="'trebuchet ms', sans-serif" color="#000099" size="1"><b>Vishwas <br></b></font></div>
</div></div></div></div></div>