﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
2479	Quic connection will be closed too early in stream prxoy mode	himac.lee@…		"When using nginx stream mode, the downstream is QUIC protocol and the stream buffer is set relatively small:

stream {
    upstream backend {
        server 127.0.0.1:19997;
    }
    server {
        listen 4443 quic reuseport rcvbuf=8M sndbuf=4M;
        ssl_alpn    h3;
        ssl_certificate     XX/cert.pem;
        ssl_certificate_key XX/secret.key;
        ssl_protocols       TLSv1.3;
        quic_max_udp_payload_size  1472;
        quic_stream_buffer_size  64k;
        quic_initial_congestion_window  100;
        proxy_pass backend;
    }
}

if the backend pushes more data, it is likely that the stream buffer will not be enough. 
At this time, the ngx_stream_write_filter function will fail, and quic the stream connection is shared, which will cause an error to be returned and the connection will be closed early.
I suggest that ngx_stream_write_filter return eagain instead of error in quic case."	defect	closed	major		other	1.21.x	fixed	quic stream busy	himac.lee@…	Linux pekphis107316 4.15.0-156-generic #163-Ubuntu SMP Thu Aug 19 23:31:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.23.0
built by gcc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx_http3/nginx --with-debug --with-ld-opt='-Wl,-rpath, -L/work/unitrans90/boringssl/src/build/ssl/ -L//work/boringssl/src/build/crypto' --with-cc-opt='-I//work//boringssl/src/include/ ' --with-stream --with-stream_quic_module --with-http_v2_module --with-http_v3_module --with-http_stub_status_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module"
