You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
netcat will print the request but not send any response. OPA will continue waiting indefinitely because there is no timeout set on the HTTP request.
Solution
This page does a good job of explaining how the various client timeouts can be set. OPA should be updated to set the Client.Do timeout (which I think means cancelling the context). Note, we do not want to set default timeouts on reading the full response since that'll cause problems for users with large bundles. It should be safe to assume that OPA starts receiving HTTP headers on the order of seconds (e.g., 10 seconds is probably a safe default.)
Initially, users should be able to configure the timeout on the service object. For example:
Steps to reproduce
This problem can reproduced simply with
nc
. For example:In a separate terminal start opa and point it at the server:
netcat will print the request but not send any response. OPA will continue waiting indefinitely because there is no timeout set on the HTTP request.
Solution
This page does a good job of explaining how the various client timeouts can be set. OPA should be updated to set the
Client.Do
timeout (which I think means cancelling the context). Note, we do not want to set default timeouts on reading the full response since that'll cause problems for users with large bundles. It should be safe to assume that OPA starts receiving HTTP headers on the order of seconds (e.g., 10 seconds is probably a safe default.)Initially, users should be able to configure the timeout on the service object. For example:
The text was updated successfully, but these errors were encountered: