I am using keycloak gatekeeper as a proxy connected to a keycloak instance to secure kibana. All tools run in a private kubernetes cluster. The keycloak gatekeeper was installed with the following helm chart https://github.com/mvitale1989/helm-keycloak-gatekeeper.
I noticed that by long running kibana queries (> 10 seconds) I get after exactly 10 seconds HTTP 502 bad gateway. I connected directly to kibana with "kubectl port-forward ...." and tested some long running queries and get timeouts after 30 seconds. That's why I think that the keycloak gatekeeper is responsible for the HTTP 502 code. I couldn't find anything in the logs from the keycloak gatekeeper instance.
Question: Is there a default timeout in keycloak gatekeeper for requests to upstream that last longer than 10 seconds? If yes, how can I change it to for example 30 seconds?
Thank you very much in advance!
We had the same problem. The two variables that are important are:
server-write-timeout: 30s
upstream-response-header-timeout: 30s
The first one is the timeout for the complete response. The second one is the timeout for receiving the first response headers.
In the config of Keycloak gatekeeper, the default value for ServerReadTimeout is set to 10 secs, see:
You should be able to change this by setting server-read-timeout in your configuration file:
server-read-timeout: 30