How do I increase the jersey WS timeout? It is waiting on a call which takes around 2 minutes. It is timing out at WS layer. Do I have to increase client timeout as well? What are the defaults for these?
You can use the two methods setConnectTimeOut
and the setReadTimeout
on your Client
instance. The documentation specifies that the default values for both are null
and thus the timeouts infinite.
Do make sure to set the setReadTimeout as per the need of your application as setting connection timeout would be partial job done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With