Topic
  • 4 replies
  • Latest Post - ‏2012-06-05T08:11:33Z by dhinckle
jbats
jbats
1 Post

Pinned topic Configure Allowable Managed Database Connections for a thread

‏2012-01-20T00:51:47Z |
I've a EAR deployed on WAS 7.0.0.17. The application is build using Spring 3.1 and JPA 2.0 and the JPA provider is Hibernate. This application was working without any issues until we upgraded WAS from 7.0.0.11 to 7.0.0.17. After upgrade I started getting an exception as below:

1/19/12 12:55:50:732 EST] 00000073 PoolManager W Exceeded the number of allowable managed connection on thread 00000073. 1 managed connections are already being used on this thread. Managed connection being used on this thread MCWrapper id 1810181 Managed connection WSRdbManagedConnectionImpl@3bf73bf7 State:STATE_TRAN_WRAPPER_INUSE Thread Id: 00000073 Thread Name: WebContainer : 6 Handle count 0
Start time inuse Thu Jan 19 12:55:49 EST 2012 Time inuse 1 (seconds)
Last allocation time Thu Jan 19 12:55:50 EST 2012 getConnection stack trace information:
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:635)
sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)

A) Is it possible to configure the WAS to increase the allowed size to more than 1.
B) Is this a fix add to 7.0.0.17 to warn about potential connection leak
C) If the application is designed such that web layer (controller) makes database calls (read only) in addition to database calls (Read/Write) at the service layer in such a scenario we would assume we would have more than one connection inolved per thread. Is there a database property to supress this check which is causing the above exception
Updated on 2012-06-05T08:11:33Z at 2012-06-05T08:11:33Z by dhinckle
  • JamesStephens
    JamesStephens
    1 Post

    Re: Configure Allowable Managed Database Connections for a thread

    ‏2012-01-20T16:52:58Z  
    Yes, custom pool property maxNumberOfMCsAllowableInThread can be set to a higher value. Go to Data sources > your Datasource or connection factory > Connection pools > Custom properties. Create the new custom pool property setting it to the value you wish.

    The warning being generated is for detecting unexpected managed connection usage on a thread during the development of an application or in production environments which are using more managed connections then expected.

    Since this is expected behavior for your application to use more then one managed connection per thread, you should only see this warning if trace is enabled or maxNumberOfMCsAllowableInThread is set.

    If this warning is occurring unexpectedly, please create a PMR and we will provide a fix to remove this warning. Until a fix can be provided, a temporary work around to the warning is to set maxNumberOfMCsAllowableInThread to a high value like 10.
  • JaySoko
    JaySoko
    1 Post

    Re: Configure Allowable Managed Database Connections for a thread

    ‏2012-01-24T23:07:07Z  
    FYI, I just enabled SIB for one of my clusters and I'm receiving the same error message. The application is an off-the-shelf product from a large company, and their consultant did not experience these errors in previous deployments on WAS 7.0.0.7 or 7.0.0.11. I only mention this because I, too, am running WAS ND 7.0.0.17. I'll enter a PMR to double check I haven't made mistakes elsewhere in my configuration which may be causing this error.
  • vincent75
    vincent75
    1 Post

    Re: Configure Allowable Managed Database Connections for a thread

    ‏2012-03-27T09:19:30Z  
    Same issue here, we use the default workmanager, I configured the custom property but did not took it into account, that one have no reference anywhere on the web.
    Any news with your PMR ?
  • dhinckle
    dhinckle
    1 Post

    Re: Configure Allowable Managed Database Connections for a thread

    ‏2012-06-05T08:11:33Z  
    Yes, custom pool property maxNumberOfMCsAllowableInThread can be set to a higher value. Go to Data sources > your Datasource or connection factory > Connection pools > Custom properties. Create the new custom pool property setting it to the value you wish.

    The warning being generated is for detecting unexpected managed connection usage on a thread during the development of an application or in production environments which are using more managed connections then expected.

    Since this is expected behavior for your application to use more then one managed connection per thread, you should only see this warning if trace is enabled or maxNumberOfMCsAllowableInThread is set.

    If this warning is occurring unexpectedly, please create a PMR and we will provide a fix to remove this warning. Until a fix can be provided, a temporary work around to the warning is to set maxNumberOfMCsAllowableInThread to a high value like 10.
    Setting the custom pool property maxNumberOfMCsAllowableInThread to 10 did not prevent the warnings for my 7.0.0.21 installation.