3 Replies Latest reply on May 3, 2007 9:03 PM by kgrjb

    java.net.SocketException: No buffer space available

    javaboss

      Just installed JBoss 3.2.1_Tomcat4.1.24 bundle

      Dropped my WAR file in deploy, started it up. Could access my website and load pages, but images loaded sporadically and could not access links to external pages. (this same war file runs great under standalone Tomcat--same version as above).

      Checking the log file, this exception is being thrown: (same thing under JBoss3.2.1_Jetty bundle):

      java.net.SocketException: No buffer space available (maximum connections reached?): connect
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1564)
      at com.mysql.jdbc.Connection.(Connection.java:485)
      at com.mysql.jdbc.Driver.connect(Driver.java:341)
      at java.sql.DriverManager.getConnection(DriverManager.java:512)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at FileDownloader.processRequest(FileDownloader.java:52)
      at FileDownloader.doGet(FileDownloader.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)




      Any ideas?

      Thanks.

        • 1. Re: java.net.SocketException: No buffer space available

          Is your datasource connection pool in JBoss configured to attempt to establish more connections than what your mysql DB is willing to give?

          (ie. IIRC for instance PostgreSQL default max number of connections was 30 and JBoss Datasource pools were configured by default to 50).

          Although if you're the only one browsing the site you shouldn't be able to reach even a small limit (unless you've got a resource leakage somewhere).

          • 2. Re: java.net.SocketException: No buffer space available
            javaboss

            Thanks for your reply.

            Changing the default datasource to use the MySql datasource instead of the default HSQL datasource seems to have solved the socket exception problem.

            But, I still have the problem of failed http connections. I have never experienced this under standalone Tomcat.

            When I run JBoss, webpages coming through port 80 fail to load or load incompletely (almost like the port is being intermitently blocked)

            Any ideas there?

            • 3. Re: java.net.SocketException: No buffer space available
              kgrjb

              hi

              i searched a lot but havenot found anything useful on this.

              on starting jboss 4.2.0.CR2 i get warnings UDP failed to join ... on lo: java.net.SocketException: No buffer space available.

              my hibernate with distributed ehcache used to work on jboss 4.0.5 but now on 4.2.0.CR2 i get this - Error doing removeAll to remote peer. Message was java.net.ConnectException: Connection refused to host: 127.0.01. i think this problem is probly related to above problem.