3 Replies Latest reply on Nov 15, 2004 10:04 AM by Errol Neal

    Understanding Jboss - Threads, Pools yada yada

    Errol Neal Newbie

      Please forgive me. I am not a Jboss expert, nor am I trying to be. I hope you folks will be kind to me.

      I am one of several people that support a java application that my company developed for one of our clients. The application runs on Jboss, but it is a version of Jboss that is supplied by Convera for use with their Retrieval Ware search product. My responsibility is really limitted to the hardware platforms, OS and related items, however I trying to gain some understanding (that the rest of the developers and support folks) don't seem to have that I think is essential in properly configuring jboss for this application..

      Sun Solaris 5.8
      Sunfire 280R w/ 2X UltraSparc III
      2GB Ram
      Jboss 3.0.7 (No, we can't upgrade :( )

      Our application is back-ended on a Sun Fire 880 with 2 procs and 4GB of RAM.

      As the subject says, I'm trying to understand the concept of pools and threads in Jboss. This application needs to support large number of simultanious connections and It seems to break at a certain number. We were stress testing a cluster of two identical machines (HW and appliation wise) and we came accross this error..

      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,880 ERROR [STDERR] org.jboss.util.NestedSQLException: No ManagedConnections Available!; - nested throwable:
      (javax.resource.ResourceException: No ManagedConnections Available!)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,881 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.j
      ava:106)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,881 ERROR [STDERR] at com.dfi.gov.mipt.tkb.DBConnection.getConnection(DBConnection.java:17)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,881 ERROR [STDERR] at com.dfi.gov.mipt.tkb.TKBUtil.getRecentNewsStories(TKBUtil.java:530)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,881 ERROR [STDERR] at org.apache.jsp.InTheNews$jsp._jspService(InTheNews$jsp.java:66)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,881 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,881 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java
      :294)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,882 ERROR [STDERR] at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:192)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:121)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at org.apache.jsp.FeedbackContent$jsp._jspService(FeedbackContent$jsp.java:313)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,883 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java
      :294)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,884 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:5
      07)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:460)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,885 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,886 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,886 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,887 ERROR [STDERR] Caused by: javax.resource.ResourceException: No ManagedConnections Available!
      INFO | jvm 1 | 2004/11/11 20:36:54 | 20:36:53,887 ERROR [STDERR] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(In
      ternalManagedConnectionPool.java:182)

      What is a "managed connection" within Jboss? I mean, Jboss 3.0.7. How do these connections and threads and the pool relate to one another?

      I hope someone can help me understand this. Already, folks are making changes and we don't understand the impact. Just trying to educate myself....

      TIA,

      Errol Neal

        • 1. Re: Understanding Jboss - Threads, Pools yada yada
          Elias Ross Master


          There are a couple pools you're dealing with:

          1. Web service connections. These are configured within some .xml file I imagine. This configures the number of simultaneous connections.
          2. Database connections. These are (likely) within some sort of -ds.xml file *or* within a -service.xml file.

          What JBoss is carping about (c.f. InternalManagedConnectionPool) is that it's out of 2. If you increase 1, you usually need 2. Locate some docs about configuring database pooling in JBoss and then find and fix the relevant file.

          • 2. Re: Understanding Jboss - Threads, Pools yada yada
            Errol Neal Newbie

             

            "genman" wrote:

            There are a couple pools you're dealing with:

            1. Web service connections. These are configured within some .xml file I imagine. This configures the number of simultaneous connections.
            2. Database connections. These are (likely) within some sort of -ds.xml file *or* within a -service.xml file.

            What JBoss is carping about (c.f. InternalManagedConnectionPool) is that it's out of 2. If you increase 1, you usually need 2. Locate some docs about configuring database pooling in JBoss and then find and fix the relevant file.


            First of all, thanks for your reply. I know that the pool size can be configured by editing the oracle-service.xml file. However, is it possible to have multipe threads managing several pools? What are acceptable limits for pool size? Can I crank it up to say 1000?



            • 3. Re: Understanding Jboss - Threads, Pools yada yada
              Errol Neal Newbie

              Also, one other thing I'd like someone to help me understand. And please forgive my obvious ignorance...

              If a connection pool of 50 is specified (minimum), does this mean that jboss will open 50 dedicated connections to a database host?

              Thanks again...