HTTP/3 stopps sending data after a bit

1. Caddy version (caddy version):

2.4.5 from github

2. How I run Caddy:

a. System environment:

Gentoo Linux 5.13.12, OpenRC, golang 1.17.1

b. Command:

Caddy run

c. Service/unit/compose file:

N/A

d. My complete Caddyfile or JSON config:

{
	debug
	#	http_port 60001
	auto_https off
	servers :60000 {
		protocol {
			experimental_http3
		}
	}

	servers [2001:470:28:704::100]:443 {
		protocol {
			experimental_http3
		}
	}
	servers [2001:470:28:704::100]:80 {
		protocol {
		}
	}
}

wikidev.tnonline.net:443 {
	tls /etc/letsencrypt/live/wikidev.tnonline.net/fullchain.pem /etc/letsencrypt/live/wikidev.tnonline.net/privkey.pem {
	}
	bind 2001:470:28:704::100
	encode zstd gzip

	@title {
		not file {
			try_files {path} {path}/
			split_path .php
		}
		path_regexp title ^/(.*)$
	}
	rewrite @title /mediawiki/index.php?title={re.title.1}&{query}
	redir / /w/Main_Page

	root * /var/www/domains/wikidev.tnonline.net/htdocs
	php_fastcgi unix//var/run/php-fpm/fpm-wiki.socket
	file_server
}

wikidev.tnonline.net:80 {
	bind 2001:470:28:704::100
	root * /var/www/domains/wikidev.tnonline.net/
	file_server
}

# RewriteRule ^/?w(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
# RewriteRule ^/?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]


mirrors.tnonline.net:60000 {
	tls /etc/letsencrypt/live/mirrors.tnonline.net/fullchain.pem /etc/letsencrypt/live/mirrors.tnonline.net/privkey.pem {
	}
	root * /var/www/domains/mirrors.tnonline.net/
	php_fastcgi unix//var/run/php-fpm/fpm-www.socket
	file_server
	encode zstd gzip
}

3. The problem I’m having:

When serving large files over HTTP/3 the transfers stop after a few MiB. I’m using https://mirrors.tnonline.net:60000 for these tests.

4. Error messages and/or full log output:

I’m not seing any errors logged. Looks like transfers simply stall.

{"level":"info","ts":1632059639.2035172,"msg":"using adjacent Caddyfile"}
{"level":"warn","ts":1632059639.2068872,"msg":"input is not formatted with 'caddy fmt'","adapter":"caddyfile","file":"Caddyfile","line":37}
{"level":"info","ts":1632059639.2079818,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
{"level":"info","ts":1632059639.2082248,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00039a770"}
{"level":"debug","ts":1632059639.2085938,"logger":"tls.cache","msg":"added certificate to cache","subjects":["mirrors.tnonline.net"],"expiration":1635988016,"managed":false,"issuer_key":"","hash":"d2fae7bf784cc33ee99dce0296a578eb6b4bf417c292d1823282c883d21bd853"}
{"level":"debug","ts":1632059639.208711,"logger":"tls.cache","msg":"added certificate to cache","subjects":["wikidev.tnonline.net"],"expiration":1639465781,"managed":false,"issuer_key":"","hash":"4e4e8fb27855a3b0a7bb95baf98e5b7492ba0ff7de38da5ae259fc6684532c33"}
{"level":"info","ts":1632059639.209651,"logger":"http","msg":"enabling experimental HTTP/3 listener","addr":":60000"}
{"level":"debug","ts":1632059639.2096736,"logger":"http","msg":"starting server loop","address":"[::]:60000","http3":true,"tls":true}
{"level":"info","ts":1632059639.209697,"logger":"http","msg":"enabling experimental HTTP/3 listener","addr":"[2001:470:28:704::100]:443"}
{"level":"debug","ts":1632059639.2097185,"logger":"http","msg":"starting server loop","address":"[2001:470:28:704::100]:443","http3":true,"tls":true}
{"level":"debug","ts":1632059639.209739,"logger":"http","msg":"starting server loop","address":"[2001:470:28:704::100]:80","http3":false,"tls":false}
{"level":"info","ts":1632059639.2098117,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/root/.local/share/caddy"}
{"level":"info","ts":1632059639.2098575,"msg":"autosaved config (load with --resume flag)","file":"/root/.config/caddy/autosave.json"}
{"level":"info","ts":1632059639.2098644,"msg":"serving initial configuration"}
{"level":"info","ts":1632059639.2102633,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"debug","ts":1632059643.0511892,"logger":"tls.handshake","msg":"choosing certificate","identifier":"mirrors.tnonline.net","num_choices":1}
{"level":"debug","ts":1632059643.0512443,"logger":"tls.handshake","msg":"custom certificate selection results","identifier":"mirrors.tnonline.net","subjects":["mirrors.tnonline.net"],"managed":false,"issuer_key":"","hash":"d2fae7bf784cc33ee99dce0296a578eb6b4bf417c292d1823282c883d21bd853"}
{"level":"debug","ts":1632059643.051261,"logger":"tls.handshake","msg":"matched certificate in cache","subjects":["mirrors.tnonline.net"],"managed":false,"expiration":1635988016,"hash":"d2fae7bf784cc33ee99dce0296a578eb6b4bf417c292d1823282c883d21bd853"}
{"level":"debug","ts":1632059643.0862348,"logger":"http.handlers.file_server","msg":"sanitized path join","site_root":"/var/www/domains/mirrors.tnonline.net/","request_path":"/haiku/release/r1beta3/haiku-r1beta3-x86_gcc2h-anyboot.iso","result":"/var/www/domains/mirrors.tnonline.net/haiku/release/r1beta3/haiku-r1beta3-x86_gcc2h-anyboot.iso"}
{"level":"debug","ts":1632059643.0862901,"logger":"http.handlers.file_server","msg":"opening file","filename":"/var/www/domains/mirrors.tnonline.net/haiku/release/r1beta3/haiku-r1beta3-x86_gcc2h-anyboot.iso"}
{"level":"info","ts":1632059651.4466825,"msg":"shutting down","signal":"SIGINT"}
{"level":"warn","ts":1632059651.4467635,"msg":"exiting; byeee!! 

5. What I already tried:

This fails. Curl receives some data and then sits waiting with no more bytes arriving. No error is logged.

curl --http3 https://mirrors.tnonline.net:60000/haiku/release/r1beta3/haiku-r1beta3-x86_gcc2h-anyboot.iso > /dev/null

This works (and very fast!):

curl --http2 https://mirrors.tnonline.net:60000/haiku/release/r1beta3/haiku-r1beta3-x86_gcc2h-anyboot.iso > /dev/null

6. Links to relevant resources:

Curl-7.78.0 is built with quiche-0.9.0 for HTTP/3 support.

It’s possible you’re running into this:

It does not look like the same. I’m starting Caddy fresh and doing one file transfer without any configuration changes during the transfer. Small files load ok. I can also ctrl-c curl and try again without restarting Caddy.

Different amounts get transferred on different attempts. I was thinking it might be due to some dropped packets, but this is on localhost so it shouldn’t happen, should it?

Is there any more data I can provide for this issue, or should I perhaps make a GitHub issue for it?

Thanks.

If you do open an issue, I would probably open it here: GitHub - lucas-clemente/quic-go: A QUIC implementation in pure go

This topic was automatically closed after 30 days. New replies are no longer allowed.