-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3 second timeout for requests when using listener_wrappers tls
sending requests to reverse_proxy
#274
Comments
Hmm I'm wondering if there's a timer of 3 sec set anywhere in the code. Can look more into it soon! |
The only default I found with exactly 3 seconds was (solely looking at the documentation) |
It's this Line 33 in 3c6cc2c
which is injected here Line 57 in 3c6cc2c
and set here: Lines 122 to 123 in 3c6cc2c
|
Good find. Yeah, so it sounds like after 3 seconds, matchers are being cancelled. I wonder if that's because there are no matchers configured? |
My understanding is the timeout of the matchers is wrongly passed to the connection read deadline. The timeout deadline isn't updated after matching. |
I take it back. It's reset here. Line 175 in 3c6cc2c
I don't know why it isn't taking effect. |
Downstream report: opnsense/plugins#4384
The issue is, that when something is going through the layer4
listener_wrappers
to thetls directive
into thereverse proxy
, there is a timeout of 3 seconds after which the context gets canceled.As example, there is an API endpoint in OPNsense that could take anywhere from 10 to 30 seconds to respond, depending on different factors. After exactly 3 seconds this context gets canceled by the client (Caddy) using this Caddyfile:
Relevant error can be seen in downstream report.
I have tested this and can reproduce it.
The text was updated successfully, but these errors were encountered: