1 Reply Latest reply on Nov 28, 2005 12:26 PM by Nitesh Varma

    java.net.SocketException during heavy load

    Erik Turesson Novice

      Hello!

      I am using jboss 4.0.3.
      Sometimes I am receiving a ClientAbortException,
      ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error

      This is when I am executing the following code:

      private void downLoadFile(HttpServletResponse response, byte[] b){
      try{
      response.setContentLength(b.length);
      OutputStream out = response.getOutputStream();
      out.write(b, 0, b.length);
      out.flush();
      out.close();
      }catch(Exception e){
      System.out.println("exception " + e);
      }
      }

      I use this code to return for example images.
      I have not been able to find out why it fails but I think that it is during heavy load. If I perform stresstests I can trigger it. Is there some configurationparameter that can be changed?

      When I trigger this problem when surfing to my site the retreiving of the image gets the browser to hang. If I then perform a reload it loads again.

      /Erik