Opened 9 months ago

Last modified 9 months ago

#2617 new defect

nginx 1.22 - sending GOAWAY to client after 60s

Reported by: drawte786@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.22.x
Keywords: Cc:
uname -a:
nginx -V: nginx-1.22

Description (last modified by drawte786@…)

Hi nginx community,
I wanted to about the changes happened from nginx 1.18 to 1.20

https://github.com/nginx/nginx/commit/0f5d0c5798eacb60407bcf0a76fc0b2c39e356bb
"With this change, behaviour of HTTP/2 becomes even closer to HTTP/1.x,
and client_header_timeout instead of keepalive_timeout is used before
the first request is received."

Usually 5G NFs establish two http2 connections, one used for requests and the other as standby that will be used when we reach max streams, so only keepalive http2 ping will be sent.

On older nginx say(1.18) above was achieved by using client_header_timeout and keepalive_timeout.

Now with the changes to 1.20,
could keep-alive timeout will help here to maintain the former behavior of nginx 1.18, where keepalive_timeout bring the connection if idle ( no control or data => no http2 ping)

# 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 

 

The issue is observed in both nginx 1.24 & nginx 1.22 ,

 

 

TEST 2 (with nginx 1.18)

$ /usr/sbin/nginx -v
nginx version: nginx/1.18.0 (1.18.0-1.el8)
grep client_header_timeout /etc/nginx/nginx.conf
        client_header_timeout           60s;
h2c connect https://<IP>:8447;while true;do sleep 60;h2c ping;done /* sending ping every 60s */
[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)

In nginx-1.18 Atfer 60s ,the connction is not broke.  

Thanks

Change History (1)

comment:1 by drawte786@…, 9 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.