otter uses a huge amount of memory for large files #131

Description

@gucci-on-fleek

When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

Demonstration
$ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
$ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
$ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
$ truncate --size=4G big-empty-file
$ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
$ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
$ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
       blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
      }
      } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
      })();
      (function(){
      try {
      var __m = "github.com";
      var __re = new RegExp('^' + "github\\.com" + '
      
      Skip to content

      otter uses a huge amount of memory for large files #131

      Description

      @gucci-on-fleek

      When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

      Demonstration
      $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
      $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
      $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
      $ truncate --size=4G big-empty-file
      $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
      $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
      2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
      2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
      $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

      Metadata

      Metadata

      Assignees

      No one assigned

        Labels

        No labels
        No labels

        Type

        No type

        Projects

        No projects

          Milestone

          No milestone

          Relationships

          None yet

          Development

          No branches or pull requests

          Issue actions

          , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
          Skip to content

          otter uses a huge amount of memory for large files #131

          Description

          @gucci-on-fleek

          When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

          Demonstration
          $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
          $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
          $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
          $ truncate --size=4G big-empty-file
          $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
          $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
          2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
          2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
          $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

          Metadata

          Metadata

          Assignees

          No one assigned

            Labels

            No labels
            No labels

            Type

            No type

            Projects

            No projects

              Milestone

              No milestone

              Relationships

              None yet

              Development

              No branches or pull requests

              Issue actions

              , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
              Skip to content

              otter uses a huge amount of memory for large files #131

              Description

              @gucci-on-fleek

              When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

              Demonstration
              $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
              $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
              $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
              $ truncate --size=4G big-empty-file
              $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
              $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
              2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
              2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
              $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

              Metadata

              Metadata

              Assignees

              No one assigned

                Labels

                No labels
                No labels

                Type

                No type

                Projects

                No projects

                  Milestone

                  No milestone

                  Relationships

                  None yet

                  Development

                  No branches or pull requests

                  Issue actions

                  , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
                  Skip to content

                  otter uses a huge amount of memory for large files #131

                  Description

                  @gucci-on-fleek

                  When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

                  Demonstration
                  $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
                  $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
                  $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
                  $ truncate --size=4G big-empty-file
                  $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
                  $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
                  2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
                  2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
                  $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

                  Metadata

                  Metadata

                  Assignees

                  No one assigned

                    Labels

                    No labels
                    No labels

                    Type

                    No type

                    Projects

                    No projects

                      Milestone

                      No milestone

                      Relationships

                      None yet

                      Development

                      No branches or pull requests

                      Issue actions

                      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
                      Skip to content

                      otter uses a huge amount of memory for large files #131

                      Description

                      @gucci-on-fleek

                      When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

                      Demonstration
                      $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
                      $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
                      $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
                      $ truncate --size=4G big-empty-file
                      $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
                      $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
                      2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
                      2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
                      $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

                      Metadata

                      Metadata

                      Assignees

                      No one assigned

                        Labels

                        No labels
                        No labels

                        Type

                        No type

                        Projects

                        No projects

                          Milestone

                          No milestone

                          Relationships

                          None yet

                          Development

                          No branches or pull requests

                          Issue actions

                          , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
                          Skip to content

                          otter uses a huge amount of memory for large files #131

                          Description

                          @gucci-on-fleek

                          When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

                          Demonstration
                          $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
                          $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
                          $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
                          $ truncate --size=4G big-empty-file
                          $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
                          $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
                          2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
                          2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
                          $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

                          Metadata

                          Metadata

                          Assignees

                          No one assigned

                            Labels

                            No labels
                            No labels

                            Type

                            No type

                            Projects

                            No projects

                              Milestone

                              No milestone

                              Relationships

                              None yet

                              Development

                              No branches or pull requests

                              Issue actions

                              , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
                              Skip to content

                              otter uses a huge amount of memory for large files #131

                              Description

                              @gucci-on-fleek

                              When trying to use the otter storage to serve a 4GB file, Caddy uses 25GB+ of memory and returns an error instead of the file's contents. The file is served correctly if I disable the cache.

                              Demonstration
                              $ caddy --versionv2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
                              $ caddy list-modules --versions --packagesadmin.api.load v2.10.2 github.com/caddyserver/caddy/v2admin.api.metrics v2.10.2 github.com/caddyserver/caddy/v2admin.api.pki v2.10.2 github.com/caddyserver/caddy/v2admin.api.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2caddy.adapters.caddyfile v2.10.2 github.com/caddyserver/caddy/v2caddy.config_loaders.http v2.10.2 github.com/caddyserver/caddy/v2caddy.filesystems v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.http_redirect v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.proxy_protocol v2.10.2 github.com/caddyserver/caddy/v2caddy.listeners.tls v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.cores.mock v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.append v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.console v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.cookie v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.delete v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.hash v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.ip_mask v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.query v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.regexp v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.rename v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.filter.replace v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.encoders.json v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.discard v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.file v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.net v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stderr v2.10.2 github.com/caddyserver/caddy/v2caddy.logging.writers.stdout v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.none v2.10.2 github.com/caddyserver/caddy/v2caddy.network_proxy.url v2.10.2 github.com/caddyserver/caddy/v2caddy.storage.file_system v2.10.2 github.com/caddyserver/caddy/v2events v2.10.2 github.com/caddyserver/caddy/v2http v2.10.2 github.com/caddyserver/caddy/v2http.authentication.hashes.bcrypt v2.10.2 github.com/caddyserver/caddy/v2http.authentication.providers.http_basic v2.10.2 github.com/caddyserver/caddy/v2http.encoders.gzip v2.10.2 github.com/caddyserver/caddy/v2http.encoders.zstd v2.10.2 github.com/caddyserver/caddy/v2http.handlers.acme_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.authentication v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.copy_response_headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.encode v2.10.2 github.com/caddyserver/caddy/v2http.handlers.error v2.10.2 github.com/caddyserver/caddy/v2http.handlers.file_server v2.10.2 github.com/caddyserver/caddy/v2http.handlers.headers v2.10.2 github.com/caddyserver/caddy/v2http.handlers.intercept v2.10.2 github.com/caddyserver/caddy/v2http.handlers.invoke v2.10.2 github.com/caddyserver/caddy/v2http.handlers.log_append v2.10.2 github.com/caddyserver/caddy/v2http.handlers.map v2.10.2 github.com/caddyserver/caddy/v2http.handlers.metrics v2.10.2 github.com/caddyserver/caddy/v2http.handlers.push v2.10.2 github.com/caddyserver/caddy/v2http.handlers.request_body v2.10.2 github.com/caddyserver/caddy/v2http.handlers.reverse_proxy v2.10.2 github.com/caddyserver/caddy/v2http.handlers.rewrite v2.10.2 github.com/caddyserver/caddy/v2http.handlers.static_response v2.10.2 github.com/caddyserver/caddy/v2http.handlers.subroute v2.10.2 github.com/caddyserver/caddy/v2http.handlers.templates v2.10.2 github.com/caddyserver/caddy/v2http.handlers.tracing v2.10.2 github.com/caddyserver/caddy/v2http.handlers.vars v2.10.2 github.com/caddyserver/caddy/v2http.ip_sources.static v2.10.2 github.com/caddyserver/caddy/v2http.matchers.client_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.expression v2.10.2 github.com/caddyserver/caddy/v2http.matchers.file v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header v2.10.2 github.com/caddyserver/caddy/v2http.matchers.header_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.host v2.10.2 github.com/caddyserver/caddy/v2http.matchers.method v2.10.2 github.com/caddyserver/caddy/v2http.matchers.not v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path v2.10.2 github.com/caddyserver/caddy/v2http.matchers.path_regexp v2.10.2 github.com/caddyserver/caddy/v2http.matchers.protocol v2.10.2 github.com/caddyserver/caddy/v2http.matchers.query v2.10.2 github.com/caddyserver/caddy/v2http.matchers.remote_ip v2.10.2 github.com/caddyserver/caddy/v2http.matchers.tls v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars v2.10.2 github.com/caddyserver/caddy/v2http.matchers.vars_regexp v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.br v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.gzip v2.10.2 github.com/caddyserver/caddy/v2http.precompressed.zstd v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.client_ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.cookie v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.first v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.header v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.ip_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.least_conn v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.query v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.random_choose v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.uri_hash v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.selection_policies.weighted_round_robin v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.fastcgi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.transport.http v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.a v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.multi v2.10.2 github.com/caddyserver/caddy/v2http.reverse_proxy.upstreams.srv v2.10.2 github.com/caddyserver/caddy/v2pki v2.10.2 github.com/caddyserver/caddy/v2tls v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.file v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.http v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.inline v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_intermediate v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.pki_root v2.10.2 github.com/caddyserver/caddy/v2tls.ca_pool.source.storage v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.automate v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_files v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_folders v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_pem v2.10.2 github.com/caddyserver/caddy/v2tls.certificates.load_storage v2.10.2 github.com/caddyserver/caddy/v2tls.client_auth.verifier.leaf v2.10.2 github.com/caddyserver/caddy/v2tls.ech.publishers.dns v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.http v2.10.2 github.com/caddyserver/caddy/v2tls.get_certificate.tailscale v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.local_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.remote_ip v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni v2.10.2 github.com/caddyserver/caddy/v2tls.handshake_match.sni_regexp v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.acme v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.internal v2.10.2 github.com/caddyserver/caddy/v2tls.issuance.zerossl v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.file v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.folder v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.pem v2.10.2 github.com/caddyserver/caddy/v2tls.leaf_cert_loader.storage v2.10.2 github.com/caddyserver/caddy/v2tls.permission.http v2.10.2 github.com/caddyserver/caddy/v2tls.stek.distributed v2.10.2 github.com/caddyserver/caddy/v2tls.stek.standard v2.10.2 github.com/caddyserver/caddy/v2 Standard modules: 127admin.api.souin v0.16.0 github.com/caddyserver/cache-handlercache v0.16.0 github.com/caddyserver/cache-handlercaddy.listeners.layer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4caddy.logging.encoders.formatted v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encodercaddy.logging.encoders.transform v0.0.0-20250416233754-15eef9743261 github.com/caddyserver/transform-encoderdns.providers.rfc2136 v1.0.0 github.com/caddy-dns/rfc2136http.handlers.cache v0.16.0 github.com/caddyserver/cache-handlerhttp.handlers.rate_limit v0.1.0 github.com/mholt/caddy-ratelimithttp.handlers.replace_response v0.0.0-20250618171559-80962887e4c6 github.com/caddyserver/replace-responsehttp.matchers.maxmind_geolocation v1.0.1 github.com/porech/caddy-maxmind-geolocationlayer4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.echo v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.subroute v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tee v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.throttle v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.handlers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.clock v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.dns v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.http v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.local_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.not v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.openvpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.postgres v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.proxy_protocol v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.quic v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.rdp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.regexp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.remote_ip_list v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks4 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.socks5 v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.ssh v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.tls v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.winbox v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.wireguard v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.matchers.xmpp v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.first v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.ip_hash v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.least_conn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.random_choose v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4layer4.proxy.selection_policies.round_robin v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4storages.cache.otter v0.0.16 github.com/darkweak/storages/otter/caddytls.handshake_match.alpn v0.0.0-20251001194302-2e3e6cf60b25 github.com/mholt/caddy-l4 Non-standard modules: 47 Unknown modules: 0
                              $ cat ./Caddyfile{ log { output stderr format console level DEBUG }}localhost { log { output stderr format console } cache { otter } file_server}
                              $ truncate --size=4G big-empty-file
                              $ du --human-readable --apparent-size big-empty-file4.0G big-empty-file
                              $ /usr/bin/time --verbose caddy run --config=./Caddyfile2025/10/06 07:49:24.619 INFO maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined2025/10/06 07:49:24.620 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 29652601651, "previous": 9223372036854775807}2025/10/06 07:49:24.620 INFO using config from file {"file": "./Caddyfile"}2025/10/06 07:49:24.621 INFO adapted config to JSON {"adapter": "caddyfile"}2025/10/06 07:49:24.622 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}2025/10/06 07:49:24.622 INFO http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}2025/10/06 07:49:24.622 INFO http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}2025/10/06 07:49:24.622 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000471080"}
                              2025/10/06 07:49:24.623 DEBUG http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":["localhost"]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}],"logs":{"logger_names":{"localhost":["log0"]}}},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"Configuration":{"API":{"basepath":"","debug":{"basepath":"","enable":false,"security":false},"prometheus":{"basepath":"","enable":false,"security":false},"security":{"basepath":"","enable":false,"secret":"","users":null},"souin":{"basepath":"","enable":false,"security":false}},"DefaultCache":{"allowed_additional_status_codes":null,"allowed_http_verbs":[],"badger":null,"cache_name":"","cdn":{},"default_cache_control":"","disable_coalescing":false,"distributed":false,"etcd":null,"headers":null,"key":{},"max_cacheable_body_bytes":0,"mode":"","nats":null,"nuts":null,"olric":null,"otter":{"Uuid":"","configuration":null,"found":true,"path":"","url":""},"redis":null,"regex":{"exclude":""},"simplefs":null,"stale":"0s","storers":null,"timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},"LogLevel":"","SurrogateKeyDisabled":false,"SurrogateKeys":null,"URLs":null,"cache_keys":{}},"badger":null,"etcd":null,"handler":"cache","key":{},"nats":null,"nuts":null,"olric":null,"otter":null,"redis":null,"simplefs":null,"stale":"0s","timeout":{"backend":"0s","cache":"0s"},"ttl":"0s"},{"handler":"file_server","hide":["./Caddyfile"]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{},"logs":{"logger_names":{"localhost":["log0"]}}}}}}
                              2025/10/06 07:49:24.623 INFO storages.cache.otter otter.storage.size 100002025/10/06 07:49:24.623 DEBUG http.handlers.cache You're running Souin with the following storages in this order OTTER2025/10/06 07:49:24.623 DEBUG http.handlers.cache Storer initialized: []types.Storer{(*otter.Otter)(0xc000472da0)}.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Try to load the storer OTTER-0s as surrogate backend2025/10/06 07:49:24.623 DEBUG http.handlers.cache Surrogate storage initialized.2025/10/06 07:49:24.623 DEBUG http.handlers.cache Set Souin as Cache-Status name2025/10/06 07:49:24.623 DEBUG http.handlers.cache Allow 2 method(s). [GET HEAD].2025/10/06 07:49:24.623 DEBUG http.handlers.cache The cache logic will run as : &{Strict:true Bypass_request:false Bypass_response:false}2025/10/06 07:49:24.623 INFO http.handlers.cache Set backend timeout to 10s2025/10/06 07:49:24.623 INFO http.handlers.cache Set cache timeout to 10ms2025/10/06 07:49:24.623 INFO http.handlers.cache Souin configuration is now loaded.2025/10/06 07:49:24.623 DEBUG http.handlers.cache registering mapping eviction for storer OTTER2025/10/06 07:49:24.623 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}2025/10/06 07:49:24.623 DEBUG http.handlers.cache run mapping eviction for storer OTTER2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:443", "tls": true, "http3": false}2025/10/06 07:49:24.623 INFO http enabling HTTP/3 listener {"addr": ":443"}2025/10/06 07:49:24.623 INFO failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.2025/10/06 07:49:24.623 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 DEBUG http starting server loop {"address": "[::]:80", "tls": false, "http3": false}2025/10/06 07:49:24.623 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}2025/10/06 07:49:24.623 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}2025/10/06 07:49:24.623 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}2025/10/06 07:49:24.624 WARN tls stapling OCSP {"identifiers": ["localhost"]}2025/10/06 07:49:24.624 DEBUG tls.cache added certificate to cache {"subjects": ["localhost"], "expiration": "2025/10/06 19:37:50.000", "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1", "cache_size": 1, "cache_capacity": 10000}2025/10/06 07:49:24.624 DEBUG events event {"name": "cached_managed_cert", "id": "7bc31211-e7e8-4f87-9806-5bd6ce020fad", "origin": "tls", "data": {"sans":["localhost"]}}2025/10/06 07:49:24.624 DEBUG events event {"name": "started", "id": "a798f3e4-67f7-42d8-8038-cd1f09a5e305", "origin": "", "data": null}2025/10/06 07:49:24.624 INFO autosaved config (load with --resume flag) {"file": "/home/max/.config/caddy/autosave.json"}2025/10/06 07:49:24.624 INFO serving initial configuration2025/10/06 07:49:24.630 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/home/max/.local/share/caddy", "instance": "d8cf091d-5eb6-4e73-892e-f97970c6d66b", "try_again": "2025/10/07 07:49:24.630", "try_again_in": 86399.999997626}2025/10/06 07:49:24.630 INFO tls finished cleaning storage units2025/10/06 07:49:30.446 DEBUG events event {"name": "tls_get_certificate", "id": "3a79207f-a54d-4791-9854-5dbc6f00cd46", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"localhost","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"::1","Port":50562,"Zone":""},"LocalAddr":{"IP":"::1","Port":443,"Zone":""}}}}2025/10/06 07:49:30.446 DEBUG tls.handshake choosing certificate {"identifier": "localhost", "num_choices": 1}2025/10/06 07:49:30.446 DEBUG tls.handshake default certificate selection results {"identifier": "localhost", "subjects": ["localhost"], "managed": true, "issuer_key": "local", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.446 DEBUG tls.handshake matched certificate in cache {"remote_ip": "::1", "remote_port": "50562", "subjects": ["localhost"], "managed": true, "expiration": "2025/10/06 19:37:50.000", "hash": "1080b96f865d59469aa5e85cc40e39164a1b0aaaaafd6ccbbbc46cbb3839fef1"}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Incomming request &{Method:GET URL:/big-empty-file Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[*/*] User-Agent:[curl/8.11.1]] Body:0xc0002d8570 GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:localhost Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr:[::1]:50562 RequestURI:/big-empty-file TLS:0xc00065e0c0 Cancel:<nil> Response:<nil> Pattern: ctx:0xc000416690 pat:<nil> matches:[] otherValues:map[]}2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request cache-control &{MaxAge:-1 MaxStale:-1 MaxStaleSet:false MinFresh:-1 NoCache:false NoStore:false NoTransform:false OnlyIfCached:false StaleIfError:0 Extensions:[]}2025/10/06 07:49:30.454 DEBUG storages.cache.otter Impossible to get the mapping key IDX_GET-https-localhost-/big-empty-file in Otter2025/10/06 07:49:30.454 DEBUG http.handlers.cache Request the upstream server2025/10/06 07:49:30.455 DEBUG http.handlers.file_server sanitized path join {"site_root": ".", "fs": "", "request_path": "/big-empty-file", "result": "big-empty-file"}2025/10/06 07:49:30.455 DEBUG http.handlers.file_server opening file {"filename": "big-empty-file"}2025/10/06 07:49:37.461 DEBUG http.handlers.cache Response cache-control &{MustRevalidate:false NoCache:map[] NoCachePresent:false NoStore:false NoTransform:false Public:false Private:map[] PrivatePresent:false ProxyRevalidate:false MaxAge:-1 SMaxAge:-1 Immutable:false StaleIfError:-1 StaleWhileRevalidate:-1 Extensions:[]}2025/10/06 07:49:40.455 INFO http.handlers.cache Internal server error on endpoint /big-empty-file: [0xc000472da0]2025/10/06 07:49:40.455 ERROR http.log.error.log0 context deadline exceeded {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "duration": 10.001342644, "error": "context deadline exceeded"}2025/10/06 07:49:40.456 ERROR http.log.access.log0 handled request {"request": {"remote_ip": "::1", "remote_port": "50562", "client_ip": "::1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/big-empty-file", "headers": {"User-Agent": ["curl/8.11.1"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 10.001342644, "size": 21, "status": 504, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["4294967296"], "X-Souin-Stored-Ttl": ["2m0s"], "Vary": ["Accept-Encoding"], "Content-Type": [], "Last-Modified": ["Mon, 06 Oct 2025 07:49:16 GMT"], "Cache-Control": [""], "Cache-Status": ["Souin; fwd=bypass; detail=DEADLINE-EXCEEDED"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Etag": ["\"ddb2otemkgur1z141z4\""]}}2025/10/06 07:50:03.359 DEBUG http.handlers.cache Store the response for GET-https-localhost-/big-empty-file{-VARY-}Accept-Encoding: with duration 1m52.538771525s2025/10/06 07:50:03.359 INFO http.handlers.cache recovered due to closed errorCacheCh chan, the request context has finished prematurely /big-empty-file2025/10/06 07:50:24.624 DEBUG http.handlers.cache run mapping eviction for storer OTTER^C2025/10/06 07:50:49.910 INFO shutting down {"signal": "SIGINT"}2025/10/06 07:50:49.919 WARN exiting; byeee!! 👋 {"signal": "SIGINT"}2025/10/06 07:50:49.919 DEBUG events event {"name": "stopping", "id": "58567fd5-8023-453d-8258-aa462ebaebcf", "origin": "", "data": null}2025/10/06 07:50:49.919 INFO http servers shutting down with eternal grace period2025/10/06 07:50:49.921 DEBUG http.handlers.cache Cleanup...2025/10/06 07:50:49.921 INFO admin stopped previous server {"address": "localhost:2019"}2025/10/06 07:50:49.921 INFO shutdown complete {"signal": "SIGINT", "exit_code": 0} Command being timed: "caddy run --config=./Caddyfile" User time (seconds): 10.00 System time (seconds): 38.38 Percent of CPU this job got: 55% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 25086852 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 431 Minor (reclaiming a frame) page faults: 8929070 Voluntary context switches: 111227 Involuntary context switches: 1776 Swaps: 0 File system inputs: 6376 File system outputs: 304 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
                              $ curl -vv https://localhost/big-empty-file # (In a separate window while the above is running)01:49:30.444032 [0-0] * Host localhost:443 was resolved.01:49:30.444134 [0-0] * IPv6: ::101:49:30.444186 [0-0] * IPv4: 127.0.0.101:49:30.444255 [0-0] * [HTTPS-CONNECT] added01:49:30.444323 [0-0] * [HTTPS-CONNECT] connect, init01:49:30.444382 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.444489 [0-0] * Trying [::1]:443...01:49:30.444757 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.444797 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.444850 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.446214 [0-0] * ALPN: curl offers h2,http/1.101:49:30.446357 [0-0] * TLSv1.3 (OUT), TLS handshake, Client hello (1):01:49:30.451578 [0-0] * CAfile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem01:49:30.451616 [0-0] * CApath: none01:49:30.451660 [0-0] * [HTTPS-CONNECT] connect -> 0, done=001:49:30.451698 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks01:49:30.451746 [0-0] * [HTTPS-CONNECT] connect, check h2101:49:30.451796 [0-0] * TLSv1.3 (IN), TLS handshake, Server hello (2):01:49:30.452014 [0-0] * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):01:49:30.452062 [0-0] * TLSv1.3 (IN), TLS handshake, Certificate (11):01:49:30.452464 [0-0] * TLSv1.3 (IN), TLS handshake, CERT verify (15):01:49:30.452582 [0-0] * TLSv1.3 (IN), TLS handshake, Finished (20):01:49:30.452650 [0-0] * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):01:49:30.452717 [0-0] * TLSv1.3 (OUT), TLS handshake, Finished (20):01:49:30.452879 [0-0] * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey01:49:30.452919 [0-0] * ALPN: server accepted h201:49:30.452966 [0-0] * Server certificate:01:49:30.453007 [0-0] * subject: 01:49:30.453046 [0-0] * start date: Oct 6 07:37:49 2025 GMT01:49:30.453080 [0-0] * expire date: Oct 6 19:37:49 2025 GMT01:49:30.453120 [0-0] * subjectAltName: host "localhost" matched cert's "localhost"01:49:30.453159 [0-0] * issuer: CN=Caddy Local Authority - ECC Intermediate01:49:30.453204 [0-0] * SSL certificate verify ok.01:49:30.453245 [0-0] * Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453284 [0-0] * Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453320 [0-0] * Certificate level 2: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25601:49:30.453359 [0-0] * [HTTPS-CONNECT] connect+handshake h21: 8ms, 1st data: 7ms01:49:30.453422 [0-0] * [HTTP/2] [0] created h2 session01:49:30.453464 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, len=18]01:49:30.453496 [0-0] * [HTTP/2] [0] -> FRAME[WINDOW_UPDATE, incr=1048510465]01:49:30.453531 [0-0] * [HTTP/2] cf_connect() -> 0, 1, 01:49:30.453567 [0-0] * [HTTPS-CONNECT] connect -> 0, done=101:49:30.453624 [0-0] * Connected to localhost (::1) port 44301:49:30.453665 [0-0] * using HTTP/201:49:30.453764 [0-0] * [HTTP/2] [1] OPENED stream for https://localhost/big-empty-file01:49:30.453801 [0-0] * [HTTP/2] [1] [:method: GET]01:49:30.453844 [0-0] * [HTTP/2] [1] [:scheme: https]01:49:30.453889 [0-0] * [HTTP/2] [1] [:authority: localhost]01:49:30.453938 [0-0] * [HTTP/2] [1] [:path: /big-empty-file]01:49:30.453985 [0-0] * [HTTP/2] [1] [user-agent: curl/8.11.1]01:49:30.454032 [0-0] * [HTTP/2] [1] [accept: */*]01:49:30.454072 [0-0] * [HTTP/2] [1] submit -> 85, 001:49:30.454121 [0-0] * [HTTP/2] [1] -> FRAME[HEADERS, len=38, hend=1, eos=1]01:49:30.454201 [0-0] * [HTTP/2] [0] egress: wrote 111 bytes01:49:30.454249 [0-0] * [HTTP/2] [1] cf_send(len=85) -> 85, 0, eos=1, h2 windows 65535-65535 (stream-conn), buffers 0-0 (stream-conn)01:49:30.454289 [0-0] > GET /big-empty-file HTTP/201:49:30.454289 [0-0] > Host: localhost01:49:30.454289 [0-0] > User-Agent: curl/8.11.101:49:30.454289 [0-0] > Accept: */*01:49:30.454289 [0-0] > 01:49:30.454563 [0-0] * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):01:49:30.454643 [0-0] * [HTTP/2] [0] ingress: read 39 bytes01:49:30.454687 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, len=30]01:49:30.454733 [0-0] * [HTTP/2] [0] MAX_CONCURRENT_STREAMS: 25001:49:30.454772 [0-0] * [HTTP/2] [0] ENABLE_PUSH: TRUE01:49:30.454822 [0-0] * [HTTP/2] [0] notify MAX_CONCURRENT_STREAMS: 25001:49:30.454866 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:30.454911 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.454963 [0-0] * [HTTP/2] [0] ingress: read 13 bytes01:49:30.454997 [0-0] * [HTTP/2] [0] <- FRAME[WINDOW_UPDATE, incr=983041]01:49:30.455035 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455115 [0-0] * [HTTP/2] [0] ingress: read 9 bytes01:49:30.455154 [0-0] * [HTTP/2] [0] <- FRAME[SETTINGS, ack=1]01:49:30.455192 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:30.455228 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455282 [0-0] * [HTTP/2] [0] -> FRAME[SETTINGS, ack=1]01:49:30.455343 [0-0] * [HTTP/2] [0] egress: wrote 9 bytes01:49:30.455387 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455427 [0-0] * Request completely sent off01:49:30.455469 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455518 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.455566 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.455615 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:30.644925 [0-0] * [HTTP/2] [0] progress ingress: done01:49:30.644984 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:31.645802 [0-0] * [HTTP/2] [0] progress ingress: done01:49:31.645866 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:32.647002 [0-0] * [HTTP/2] [0] progress ingress: done01:49:32.647076 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:33.648205 [0-0] * [HTTP/2] [0] progress ingress: done01:49:33.648302 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:34.648779 [0-0] * [HTTP/2] [0] progress ingress: done01:49:34.648853 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:35.649966 [0-0] * [HTTP/2] [0] progress ingress: done01:49:35.650038 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:36.651183 [0-0] * [HTTP/2] [0] progress ingress: done01:49:36.651253 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:37.652408 [0-0] * [HTTP/2] [0] progress ingress: done01:49:37.652501 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:38.652777 [0-0] * [HTTP/2] [0] progress ingress: done01:49:38.652865 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:39.653983 [0-0] * [HTTP/2] [0] progress ingress: done01:49:39.654053 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=0/65536, connection 1048576000/104857600001:49:40.456379 [0-0] * [HTTP/2] [0] ingress: read 206 bytes01:49:40.456431 [0-0] < HTTP/2 504 01:49:40.456484 [0-0] * [HTTP/2] [1] local window update by 1042022401:49:40.456528 [0-0] * [HTTP/2] [1] status: HTTP/2 50401:49:40.456579 [0-0] < accept-ranges: bytes01:49:40.456626 [0-0] * [HTTP/2] [1] header: accept-ranges: bytes01:49:40.456681 [0-0] < alt-svc: h3=":443"; ma=259200001:49:40.456734 [0-0] * [HTTP/2] [1] header: alt-svc: h3=":443"; ma=259200001:49:40.456777 [0-0] < cache-control: 01:49:40.456818 [0-0] * [HTTP/2] [1] header: cache-control: 01:49:40.456866 [0-0] < cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456906 [0-0] * [HTTP/2] [1] header: cache-status: Souin; fwd=bypass; detail=DEADLINE-EXCEEDED01:49:40.456950 [0-0] < etag: "ddb2otemkgur1z141z4"01:49:40.457011 [0-0] * [HTTP/2] [1] header: etag: "ddb2otemkgur1z141z4"01:49:40.457056 [0-0] < last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457095 [0-0] * [HTTP/2] [1] header: last-modified: Mon, 06 Oct 2025 07:49:16 GMT01:49:40.457134 [0-0] < server: Caddy01:49:40.457173 [0-0] * [HTTP/2] [1] header: server: Caddy01:49:40.457221 [0-0] < vary: Accept-Encoding01:49:40.457257 [0-0] * [HTTP/2] [1] header: vary: Accept-Encoding01:49:40.457292 [0-0] < x-souin-stored-ttl: 2m0s01:49:40.457327 [0-0] * [HTTP/2] [1] header: x-souin-stored-ttl: 2m0s01:49:40.457362 [0-0] < content-length: 429496729601:49:40.457394 [0-0] * [HTTP/2] [1] header: content-length: 429496729601:49:40.457443 [0-0] < date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457491 [0-0] * [HTTP/2] [1] header: date: Mon, 06 Oct 2025 07:49:40 GMT01:49:40.457541 [0-0] * [HTTP/2] [1] <- FRAME[HEADERS, len=197, hend=1, eos=0]01:49:40.457573 [0-0] < 01:49:40.457607 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.457659 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457731 [0-0] * [HTTP/2] [0] ingress: read 30 bytes01:49:40.457770 [0-0] * [HTTP/2] [0] progress ingress: inbufg=001:49:40.457812 [0-0] * [HTTP/2] [0] progress ingress: done01:49:40.457851 [0-0] * [HTTP/2] [1] -> FRAME[RST_STREAM, len=4, flags=0, error=1]01:49:40.457888 [0-0] * [HTTP/2] [1] RESET: PROTOCOL_ERROR (err 1)01:49:40.457933 [0-0] * [HTTP/2] [1] DRAIN select_bits=101:49:40.458005 [0-0] * [HTTP/2] [0] egress: wrote 13 bytes01:49:40.458033 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 81, window=-1/-1, connection 1048575979/104857600001:49:40.458096 [0-0] * [HTTP/2] [1] returning CLOSE01:49:40.458131 [0-0] * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)01:49:40.458165 [0-0] * [HTTP/2] [1] stream_recv(len=102400) -> -1, 9201:49:40.458199 [0-0] * [HTTP/2] [1] cf_recv(len=102400) -> -1 92, window=-1/-1, connection 1048575979/104857600001:49:40.458243 [0-0] * Connection #0 to host localhost left intactcurl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)Internal server error

                              Metadata

                              Metadata

                              Assignees

                              No one assigned

                                Labels

                                No labels
                                No labels

                                Type

                                No type

                                Projects

                                No projects

                                  Milestone

                                  No milestone

                                  Relationships

                                  None yet

                                  Development

                                  No branches or pull requests

                                  Issue actions