From f3be9c8fdc1409681ee5219df6dbf821f95f3a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Fri, 30 Aug 2024 17:13:04 +0200 Subject: [PATCH] Document request and connection timeout configs of the http auth backend (cherry picked from commit 29a5e7965c3459408042a6e166d20a6b7e992b2f) (cherry picked from commit 8d3457891b2d84650fc4321ca74c45700c5744b3) --- deps/rabbitmq_auth_backend_http/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/deps/rabbitmq_auth_backend_http/README.md b/deps/rabbitmq_auth_backend_http/README.md index 050e3837d2ec..fefb2889d862 100644 --- a/deps/rabbitmq_auth_backend_http/README.md +++ b/deps/rabbitmq_auth_backend_http/README.md @@ -159,6 +159,27 @@ If the certificate of your Web Server should be matched against a wildcard certi {customize_hostname_check, [{match_fun,public_key:pkix_verify_hostname_match_fun(https)}]} ``` +## Tuning HTTP client timeouts + +You can configure the request timeout and connection timeout (see `timeout` and `connect_timeout` respectively in Erlang/OTP [httpc documentation](https://www.erlang.org/doc/apps/inets/httpc.html#request/5)). The default value is 15 seconds for both. + +In `rabbitmq.conf`: + +``` +auth_http.request_timeout=20000 +auth_http.connection_timeout=10000 +``` + +In the [`advanced.config` format](https://www.rabbitmq.com/configure.html#advanced-config-file): + +``` +{rabbitmq_auth_backend_http, + [{request_timeout, 20_000}, + {connection_timeout, 10_000}, + ... +]} +``` + ## Debugging [Enable debug logging](https://rabbitmq.com/logging.html#debug-logging) to see what the backend service receives.