|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WebSphere MQ and WAS 5.1.19 Queue Connection Factory |
« View previous topic :: View next topic » |
Author |
Message
|
roldancer |
Posted: Thu May 04, 2006 7:23 am Post subject: WebSphere MQ and WAS 5.1.19 Queue Connection Factory |
|
|
Novice
Joined: 12 May 2004 Posts: 12
|
Hi All,
I'm running some stress test WEB applications, these appls just put/get messages from WebSphere MQ, I have seen two things.
1) The QCF connection pool has a Max Connections value of 10 but under stress I have seen 33 fisical connections (port 1414) to MQ Server, Any idea ?
2) If a connection is not used after 5 minutes it is closed, but if you look at the connection pool settings, there isn't any parameter to close a connection after 5 minutes, any idea ?
Thanks. |
|
Back to top |
|
 |
teal |
Posted: Thu May 04, 2006 8:56 am Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
In the same section of the admin console (or however you are configuring your resource for the QCF, maybe wsadmin) you will also need to alter the settings besides just Max connections. You will want to make adjustments to the unused timeout and possible aged timeout parameters and also the reap time parameter.
basically the reap time specifies how often you want the the manager(or pool maintenance thread)runs and checks the status of the connections in the pool USING the unused timeout/aged timeout settings.
the unused timeout specifies when an unused connection is discarded by the pool maintenance thread. while the aged timeout is saying the aged connection is discarded (regardless of recent usage activity)
remember when you call the .close() method in your code, it is simply returning the connection to the pool, the above adjustments will cause the connection to be entirely removed from the pool.
As for your first question, if you have max connections set to 10 and using WMQ as the full provider I know WAS will connect to MQ with a server connection channel but not sure about why you see 33. |
|
Back to top |
|
 |
roldancer |
Posted: Thu May 04, 2006 10:37 pm Post subject: |
|
|
Novice
Joined: 12 May 2004 Posts: 12
|
Hi,
These are the setting for my QCF Connection Pool.
Connec. Timeout: 180 s
Max. Connec. : 10
Min. Connections : 1
Reap Time : 180 s
Unused Timeout : 1800 s
Aged Timeout : 0 s
I know the meaning of these parameters, but I can't see any value to close the connection after 5 minutes of inactivity. I think that there is another connection pool and JCA connection pool is ignored, by the way my applications don't use MDB.
thanks. |
|
Back to top |
|
 |
roldancer |
Posted: Thu May 04, 2006 11:23 pm Post subject: |
|
|
Novice
Joined: 12 May 2004 Posts: 12
|
Hi All,
Well I found there two properties
MQJMS.POOLING.TIMEOUT
MQJMS.POOLING.THRESHOLD
And MQJMS.POOLING.TIMEOUT has a default value of 5 minutes, this is the reason why my connections are closed after 5 minutes of inactivity, the problem is that there parameters can't be use as custom porperty at the QCF ..... only are availably at the Listener Port Service ...
Can someone tell me how can I configre the QCF connection pool for a Websphere MQ JMS from WAS ?
Thanks. |
|
Back to top |
|
 |
briancop |
Posted: Wed May 10, 2006 4:19 am Post subject: |
|
|
 Apprentice
Joined: 04 Apr 2005 Posts: 28 Location: Hursley, UK
|
On the question over 33 physical connections, JMS may need to create more than one physical connections to the queue manager for a single JMS Connection object. MQ connections are more equivalent to JMS Sessions than Connections, so if you have multiple Sessions within your Connections, or if you need additional MQ services such as cleanup threads or management of temporary queues, then the JMS implementation may create additional physical connections to the queue manager to support these. The 10 Max Connections on the admin panel refers to JMS Connections, not the physical connections to the queue manager. THere is not necessarily a direct 1:1 mapping between JMS concepts and MQ concepts. |
|
Back to top |
|
 |
roldancer |
Posted: Thu May 11, 2006 12:46 am Post subject: |
|
|
Novice
Joined: 12 May 2004 Posts: 12
|
Hi,
Thanks for your help, I was reading the JMS 1.1 specification and I agree with you JMS Session are more equivalent to MQ connection.
Now my question is, why I can't manage the connection's lifecycle from WAS's QCF configuration ? why the connections are closed after 5 minutes ? is it posible to manage MQ connections lifecycle from WAS console ?
thanks. |
|
Back to top |
|
 |
pault |
Posted: Thu May 18, 2006 12:52 am Post subject: |
|
|
Newbie
Joined: 16 May 2006 Posts: 1
|
Hi,
I have just read this thread, and am wondering if there is something on your network that is closing the connections between WAS and WMQ after 5 minutes of inactivity.
The way the JMS connection pooling works in WAS is slightly confusing. As has been previously mentioned, the QCF's Unused timeout property specifies how long a free connection will remain in the application server's connection pool before it is discarded. From the values mentioned earlier, we can see that Unused timeout is set to 1800 seconds, which means that, when an application has finished with a connection, it will remain in the pool for 30 minutes before being discarded.
If the WAS Connection Manager discards the connection, from an application server perspective, it will be closed.
However, in actual fact, the connection will be left open, and returned to the WebSphere MQ JMS connection pool. If the application server requests a new connection, this connection will be taken out of the WMQ JMS pool and given to the WAS connection pool. If the connection remains in the WMQ JMS pool for 5 minutes (the value of the MQJMS.POOLING.TIMEOUT property), it will really be closed!
I hope all of this makes sense!!
Now, all of this only comes into play your WAS application closes a JMS connection, and the connection gets put back in the application server's connection pool.
Based on what you've said, it appears that the connection is actually being used by the JMS application, but is closed if nothing happens on that connection for 5 minutes. This is what leads me to think there might be something on the network that is closing the connection, rather than either WAS or WMQ.
In the past, we have had a couple of situations where network hardware was incorrectly closing connections between WAS and WMQ:
- In one situation, a Cisco Load Balancing Router was configured to close connections if they had been unused for 2 hours. The first either WAS or WMQ knew about this was when they tried to use the connection, at which point they got a connection broken error.
- In another situation, a firewall was configured to block keep alive packets. WMQ tried to send these packets periodically, to ensure the connection was maintained. However, when these packets arrived at the firewall, they were blocked and the connection was closed.
Is there any hardware on your network that could be causing similiar behaviour, and closing connections after 5 minutes of inactivity? A TCP/IP sniffer trace might help debug this.
Hope this helps |
|
Back to top |
|
 |
roldancer |
Posted: Thu May 18, 2006 7:26 am Post subject: |
|
|
Novice
Joined: 12 May 2004 Posts: 12
|
Hi,
We don't have any hardware (firewall/router etc), WAS and MQ are in the same vlan. After running our tests using QCF (client MODE) from WAS, we can say that WAS's QCF parameters are completely ingnored.
Thanks. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|