Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WAS/WMQ unable to allocation connection with heavy load

378 views
Skip to first unread message

Thomas

unread,
Jun 22, 2004, 10:26:06 AM6/22/04
to
I am having problems running my application under heavy load on WAS 5.1 and
WMQ 5.3 on Windows 2000. I am porting it from Apache Tomcat/JBoss. If I have
a client with up to three threads sending requests to WebSphere, the
application seems to work properly (in tests up to 10,000 messages per
thread). If I increase the number of threads to say 10, then the application
will work properly for a while (around two minutes and 200 messages per
thread), until it comes up with the errors listed below stating that it
cannot get a connection from the pool.

I will end up with messages stuck in the queue. If I restart WAS, then the
messages will be picked up from the queue and be processed normally.

The WMQ log shows: Maximum number of channels reached. How can I tell how
many connections are currently in use to WMQ and how many connections are
allowed (maximum)? The error says to use the config file to change the
maximum, but I cannot find this file.

Thanks!

Here are my setting for the WAS Connection Factory Connection Pool:
Connection Timeout = 30
Max Connections = 99
Min Connections = 30
Reap Time = 1800
Unused Timeout = 1800
Aged Timeout = 0
Purge Policy = Entire Pool


In the MQ Error log, I get the following errors (repeated numerous times):

AMQ9513: Maximum number of channels reached.
EXPLANATION:
The maximum number of channels that can be in use simultaneously has been
reached. The number of permitted channels is a configurable parameter in the
queue manager configuration file.

AMQ9999: Channel program ended abnormally.
EXPLANATION:
Channel program 'SYSTEM.DEF.SVRCONN' ended abnormally.

In the Systemout.log:

[6/22/04 11:06:02:773 ADT] 21ba998a ConnectionMan E J2CA0020E: The
Connection Pool Manager could not allocate a Managed Connection:
javax.resource.spi.ResourceAllocationException: Failed to create session
at
com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(Fr
eePool.java:1321)
at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java
:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:6
22)
at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:
424)
at
com.ibm.ejs.jms.JMSQueueConnectionHandle.createQueueSession(JMSQueueConnecti
onHandle.java:177)
....

---- Begin backtrace for Nested Throwables
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for
'mqserver:QM_testBox'
at
com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.jav
a:556)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1736)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1129)
at
com.ibm.mq.jms.MQQueueConnection.createQueueSession(MQQueueConnection.java:4
90)
....

---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2,
Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
at
com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:239)
at
com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQCl
ientManagedConnectionFactoryJ11.java:276)
at
com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQCli
entManagedConnectionFactoryJ11.java:296)
....

Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException
occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
at
com.ibm.mq.MQInternalCommunications.establishChannel(MQInternalCommunication
s.java:1534)
at
com.ibm.mq.MQInternalCommunications.<init>(MQInternalCommunications.java:522
)
....


[6/22/04 11:06:02:783 ADT] 21ba998a ConnectionEve A J2CA0056I: The
Connection Manager received a fatal connection error from the Resource
Adaptor for resource UIL2ConnectionFactory. The exception which was
received is javax.jms.JMSException: MQJMS2005: failed to create
MQQueueManager for 'mqserver:QM_testBox'

[6/22/04 11:06:32:786 ADT] 2185198a FreePool E J2CA0045E: Connection
not available while invoking method queueRequest for resource
UIL2ConnectionFactory.

[6/22/04 11:06:32:916 ADT] 2185198a ConnectionMan E J2CA0020E: The
Connection Pool Manager could not allocate a Managed Connection:
com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not
available, Timed out waiting for 30003
at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java
:1030)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:6
22)
at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:
424)
at
com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle.createQueueConnection(JMSQue
ueConnectionFactoryHandle.java:80)
....

Ron Bower

unread,
Jun 22, 2004, 3:08:29 PM6/22/04
to
The max active channels reached is telling you that you have configured a
number of MaxActiveChannels for WMQ and have reached this. The default for
the product is 100 (same as MaxChannels). I believe that the embedded JMS
changes this default to 1000. I'd suggest that you increase both your
MaxChannels and MaxActiveChannels. You can do it with the MQ Services.
Look under the channels tab.

Ron Bower

"Thomas" <thomas@_NOSPAM_wetmore.ca> wrote in message
news:2kXBc.62234$Np3.2...@ursa-nb00s0.nbnet.nb.ca...

Thomas

unread,
Jun 24, 2004, 7:22:15 AM6/24/04
to
Thanks for the info. That has resolved the problem with the MQ Channels
error. I am now able to do longer message tests. However I still do get the
following error after a few thousand messages are sent through:

[6/24/04 8:08:24:925 ADT] 250b6fd8 FreePool E J2CA0045E: Connection not


available while invoking method queueRequest for resource
UIL2ConnectionFactory.

[6/24/04 8:08:24:925 ADT] 250b6fd8 ConnectionMan E J2CA0020E: The Connection


Pool Manager could not allocate a Managed Connection:
com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not
available, Timed out waiting for 30003
at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java

(Compiled Code))
at
com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java(Compiled
Code))


at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:6
22)
at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:
424)
at
com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle.createQueueConnection(JMSQue
ueConnectionFactoryHandle.java:80)
....


Could this be caused because my Max Connections on my connection factory is
too low or too high? Is this WAS saying that all 99 connections are in use?
There may be something wrong with the application, so it may not be
releasing connections properly. Is there any way to actively see the number
of connections in WAS that are currently in use? In WMQ, I see the Open
Input Count on my four queues as 15, 3, 1, 1 and Open Output Count as 10,
15, 0, 0. So that is less than 99, and certainly less than the 1000 max by
WMQ now.

Thanks


"Ron Bower" <bo...@n0sp8m.us.ibm.com> wrote in message
news:cba047$53ek$1...@news.boulder.ibm.com...


> The max active channels reached is telling you that you have configured a
> number of MaxActiveChannels for WMQ and have reached this. The default
for
> the product is 100 (same as MaxChannels). I believe that the embedded JMS
> changes this default to 1000. I'd suggest that you increase both your
> MaxChannels and MaxActiveChannels. You can do it with the MQ Services.
> Look under the channels tab.
>
> Ron Bower
> "Thomas" <thomas@_NOSPAM_wetmore.ca> wrote in message
> news:2kXBc.62234$Np3.2...@ursa-nb00s0.nbnet.nb.ca...

0 new messages