Keycloak REST API: Getting 502 during long-running request

Environment: Keycloak 4.5.Final

I have a custom REST API deployed to Keycloak which tends to result in a long-running process. The REST API is invoked from a Java command-line client via RESTEasy. After 5 minutes, I receive a 502 response with content similar to the following:

The proxy server received an invalid response from an upstream server. The proxy server could not handle the request … Reason: Error reading from remote server

I’m not sure what proxy server this is referring to since I’m hitting Keycloak directly. Also, I don’t see this 502 response in Keycloak’s access.log.

But my actual question is what setting do I need to tweak to increase this timeout? This seems like an HTTP proxy timeout as opposed to a transaction timeout. I had previously increased the max tx timeout and I don’t see a tx error in the server logs.