title: javax.ws.rs.ProcessingException: java.net.SocketTimeoutException - Jersey Client
body: <p>I am attempting to read a REST web service response in a client and it works fine for individual calls. While doing the load test (~5000 calls in 5 minutes) for same web service call, I am getting socket read time out error.</p>
  
  <p>The bigger problem is, the socket time error actually happens after a  web service response is successfully received (checked via wireshark) (may be jersey client is confused).</p>
  
  <p>Earlier I was using Jersey client 1.x, now tried the same with Jersey client 2.x and still we see the error.</p>
  
  <p>I have checked most of the read timeout examples in stack overflow and couldn't find an appropriate case</p>
  
  <p><a href="https://stackoverflow.com/questions/17079273/java-net-sockettimeoutexception-read-timed-out-under-tomcat">java.net.SocketTimeoutException: Read timed out under tomcat</a>
  <a href="https://stackoverflow.com/questions/18043573/fix-java-net-sockettimeoutexception-read-timed-out">fix java.net.SocketTimeoutException: Read timed out</a></p>
  
  <p><a href="https://stackoverflow.com/questions/17079273/java-net-sockettimeoutexception-read-timed-out-under-tomcat">java.net.SocketTimeoutException: Read timed out under tomcat</a></p>
  
  <p>I am getting the following error </p>
  
  <blockquote>
    <p>javax.ws.rs.ProcessingException: java.net.SocketTimeoutException: Read
    timed out     at
    org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:287</p>
  </blockquote>
  
  <p>Just wanted to confirm on few things. Any suggestions will really help me to get directions on debugging the issue.</p>
  
  <ol>
  <li>Is there a possibility in Jersey client to get confused when the
  volume of API calls are 5000 in a span of 5 minutes. I see socket
  timeout only that time</li>
  <li>I believe if the content-length is mismatched then jersey may wait for the Rest service to send more output. Not sure if that will be
  the case</li>
  <li>The API response time is not a very large one, typically time 7 ~ 10 seconds.</li>
  </ol>
  
  <p>Note : I am not a Java Developer and any help is much appreciated.</p>