4 Replies Latest reply on Feb 13, 2014 8:19 AM by Khalid Hussain

    No ManagedConnections available within configured blocking timeout in Jboss 4.0.1 sp1

    Khalid Hussain Newbie

      Hi,

       

      I have replied to a post based on the same question with my query, have the problems with connection pool, using Jboss AS 4.0.1 sp1, jdk 1.4, sql server 2005 on a legacy application. No. of users have also grown recently and so has increase the max pool size from 200/300 to the current one.

      The net result is my application gets extremely slow and unable to process any request and ultimately i restarts the JBoss AS to get application available for end users and things move on. DS details are below. Please suggest any solution to this.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <datasources>

        <local-tx-datasource>

        <jndi-name>MYDS</jndi-name>

        <connection-url>

        jdbc:sqlserver://serverurl:Port;DatabaseName=MYDB;SelectMethod=cursor

        </connection-url>

        <driver-class>

        com.microsoft.sqlserver.jdbc.SQLServerDriver

        </driver-class>

        <user-name>***</user-name>

        <password>***</password>

        <min-pool-size>50</min-pool-size>

        <max-pool-size>550</max-pool-size>

        <query-timeout>60</query-timeout>

        <blocking-timeout-millis>60000</blocking-timeout-millis>

        <idle-timeout-minutes>1</idle-timeout-minutes>

        <metadata>

        <type-mapping>MS SQLSERVER2000</type-mapping>

        </metadata>

        </local-tx-datasource>

      </datasources>

        • 1. Re: No ManagedConnections available within configured blocking timeout in Jboss 4.0.1 sp1
          Wolf-Dieter Fink Master

          I'm not sure what can be the cause.

          The blocking timeout of 60,000ms seems very long, I dit not want to wait 60sec for the next free connection. You might reduce it to a couple of ms that you can see if there are threads waiting for it.

          Do you see that the connections are fully used?

          • 2. Re: No ManagedConnections available within configured blocking timeout in Jboss 4.0.1 sp1
            Khalid Hussain Newbie

            Hi Fink,

             

            Thanks for your feedback. On blocking timeout, while googling i checked various developers who set this on 30sec they are also making complaints of the same error 'No managed Connection'. Would it be better to make it 30sec. I am unable to understand by term connections are fully used? kindly clarify. Secondly, jmx-console is not working properly with jboss, now i am looking to attach Java Melody to check connection pool manager MBean properties for ConnectionCount, AvailableConnectionCount, MaxConnectionInUseCount, InUseConnectionCount.

             

            Please help me to fix this OR guide any other workaround that can be used to get rid of this issue.

            Thanks.

            • 3. Re: No ManagedConnections available within configured blocking timeout in Jboss 4.0.1 sp1
              Wolf-Dieter Fink Master

              If you look to the jmx- or management-console you wil find the pools under the JCA point.

              You can see different configuration options here and also the number of connections that are current in use and the max of used connections.

              "Fully used" mean the pool does not have more connections (all are busy).

              Busy might mean the application does not close it (this mean here the connection is not longer in use and will be back to the pool)

               

              Now the blocking timout come into play, this time mean how long the getConnection should wait for a free connection if there is no available in the pool.

              So a long blocking timeout might only hide a performance problem if there are too many parallel requests. But if you havn't such huge access this mean you have a leak and the connections are not going back to pool.

              In that case you need to check the application whether the connection/statements are closed in ANY case after use

              • 4. Re: No ManagedConnections available within configured blocking timeout in Jboss 4.0.1 sp1
                Khalid Hussain Newbie

                Hi Fink,

                Sorry for late reply, i am attaching connection pool details showing connection details along with connections destroyed count. It seems that connections are closing but i am still getting same error of 'No Managed Connection'. As per your suggestion additionally i will also check that statements are closed or not?

                But, you please share your opinion on this.

                Thanks.

                 

                ConnectionPool.png