Query on diff between nginx 1.18 and nginx 1.20+

Vishwas Bm bmvishwas at gmail.com
Tue Mar 12 05:46:46 UTC 2024


HI,

We were using the tool from *https://github.com/fstab/h2c
<https://github.com/fstab/h2c> *and seeing change in behaviour between 1.18
and 1.20+ wrt client_header_timeout configuration.
We suspect change
https://github.com/nginx/nginx/commit/0f5d0c5798eacb60407bcf0a76fc0b2c39e356bb
causing this change in behaviour.
Can we get some thoughts on this ?

Scenario:

>
> *With nginx 1.20+         *
>
> *# h2c connect https://<IP>:449; while true;  do sleep 1;h2c ping;done*
> [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)
>
>


> TEST 2 (with nginx 1.18)
> *h2c connect https://<IP>:449; while true; do sleep 1;h2c ping; done *
> [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.
>
>
*Queries:*
How can we achieve the same behaviour of 1.18 in 1.20+ ?  Is it possible to
achieve it ?

Also what is the difference between keepalive_timeout and
client_header_timeout ?

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.

> keepalive_timeout 10s;

client_header_timeout 22s;




*Thanks & Regards,*

*Vishwas *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20240312/17b1e9f4/attachment.htm>


More information about the nginx mailing list