Search code examples
jerseyjersey-2.0jersey-client

Jersey client gets 504 when server keeps processing request


I have a Jersey client and server. And I see this behavior:

  1. In client I post a request

  2. In the server I see the request and start to handle it

  3. Then out of a sudden I receive an empty response with status 504 to the client while the server still processes the request

I've set the client properties to have read and connect timeouts much higher than the time I get the empty response


Solution

  • After further analysis - the gateway timeout was due to a Load-Balancer between the client and the server.

    Reconfiguring the timeout in the Load-Balancer solved the issue