|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
multiple connections to one qmgr, 3000+ fails |
« View previous topic :: View next topic » |
Author |
Message
|
sangminli |
Posted: Mon Aug 16, 2010 7:14 am Post subject: multiple connections to one qmgr, 3000+ fails |
|
|
 Voyager
Joined: 26 Aug 2008 Posts: 75 Location: Hangzhou, China
|
Hi, I have one simple test java program, which only generates connection to qmgr, then disconnect. When the number of connections increase to near 4000, the qmgr refuse the connections.
the java code is as:
Code: |
import com.ibm.mq.*;
class Test{
public static void main(String[] args) throws MQException, ClassNotFoundException{
try{
for (int i = 0; i < 5000; i ++){
MQEnvironment.hostname = "127.0.0.1";
MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";
MQEnvironment.port = 1414;
MQQueueManager qMgr = new MQQueueManager("MMSGD1Q1");
qMgr.disconnect();
System.out.println(i + " connections done!");
}
}catch (MQException mqe){
mqe.printStackTrace();
}
} |
And the errors are like:
all the above connections are done ok..
...
3936 connections done!
3937 connections done!
MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:212)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:318)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:338)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:451)
at Test.main(Test.java:10)
Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
at com.ibm.mq.MQInternalCommunications.createSocketConnection(MQInternalCommunications.java:2316)
at com.ibm.mq.MQv6InternalCommunications$1.run(MQv6InternalCommunications.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.MQv6InternalCommunications.initialize(MQv6InternalCommunications.java:154)
at com.ibm.mq.MQv6InternalCommunications.<init>(MQv6InternalCommunications.java:102)
at com.ibm.mq.MQSESSIONClient.MQCONNX(MQSESSIONClient.java:1337)
at com.ibm.mq.MQSESSIONClient.MQCONN(MQSESSIONClient.java:1246)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:184)
... 10 more
Anyone has any ideas on why the connections are refused?
I am using MQ V7 on Windows XP. |
|
Back to top |
|
 |
zpat |
Posted: Mon Aug 16, 2010 7:18 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 16, 2010 7:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Max channels reached? |
or max server resources. Bit of a hard limit for that though. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Aug 16, 2010 3:41 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Quote: |
When the number of connections increase to near 4000, the qmgr refuse the connections. |
Actually it looks like the MQ client classes are unable to open a TCP socket to the queue manager. Check the client error log (C:\P F\IBM\WebSphere MQ\errors\AMQERR01.LOG) for further diagnostics, such as a winsock error code. You are probably hitting a Windows system resource limitation. _________________ Glenn |
|
Back to top |
|
 |
sangminli |
Posted: Mon Aug 16, 2010 4:16 pm Post subject: |
|
|
 Voyager
Joined: 26 Aug 2008 Posts: 75 Location: Hangzhou, China
|
zpat wrote: |
Max channels reached? |
propably not.. i increase both the max channel and max active channels to 5000. and as you see, i disconnect from the qmgr everytime before i connect the next time. |
|
Back to top |
|
 |
sangminli |
Posted: Mon Aug 16, 2010 4:31 pm Post subject: |
|
|
 Voyager
Joined: 26 Aug 2008 Posts: 75 Location: Hangzhou, China
|
gbaddeley wrote: |
Quote: |
When the number of connections increase to near 4000, the qmgr refuse the connections. |
Actually it looks like the MQ client classes are unable to open a TCP socket to the queue manager. Check the client error log (C:\P F\IBM\WebSphere MQ\errors\AMQERR01.LOG) for further diagnostics, such as a winsock error code. You are probably hitting a Windows system resource limitation. |
there is no errors in the client error log or in the qmgr error log or in the system event log.. |
|
Back to top |
|
 |
sangminli |
Posted: Mon Aug 16, 2010 4:33 pm Post subject: |
|
|
 Voyager
Joined: 26 Aug 2008 Posts: 75 Location: Hangzhou, China
|
Vitor wrote: |
zpat wrote: |
Max channels reached? |
or max server resources. Bit of a hard limit for that though. |
yes, it is probable some system resource gets to the limit. but sometimes it can only go to 1900+, then connection refused. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 16, 2010 7:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sangminli wrote: |
zpat wrote: |
Max channels reached? |
propably not.. i increase both the max channel and max active channels to 5000. and as you see, i disconnect from the qmgr everytime before i connect the next time. |
Yes but you do it way to fast. There is, I believe, some kind of hardware socket caching mechanism, which really means you have a lot more open than you believe.... Thus hitting a possible hardware limit...
Connections, especially if reuse so close and so often, should be pooled.
Have fun  _________________ MQ & Broker admin |
|
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
|
|
|
|