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

    java.net.SocketException during heavy load

    erikture

      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

        • 1. Re: java.net.SocketException during heavy load
          nitesh

          I'm getting similar problem under heavy load on Tomcat with JBoss AS 4.0.2

          The client gets the following error:
          "EXCEPTION : java.net.SocketException: Too many open files"

          I'm not getting this problem with stand-alone Tomcat, only with Tomcat running under JBoss. Is there a known solution?