Author |
Message
|
sebastia |
Posted: Wed Jun 05, 2013 2:50 am Post subject: MQCONNX timeout |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Hi.
Is there a way to modify the timeout value for MQCONNX(),
this is, the time we wait before "2538 MQRC_HOST_NOT_AVAILABLE" is returned ?
We are basically using AMQSCNXC.C for our tests.
Thanks for any pointer or URL.
Sebastian. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 05, 2013 3:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
presumably the timeout is a combination of the client-connection/server-connection details (which can be set using the MQCD you put in the MQCNO) and the TCP/IP config of the client and server. |
|
Back to top |
|
 |
sebastia |
Posted: Wed Jun 05, 2013 4:29 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Thanks, Jeff.
MQCD : I shall have a look at
Quote: |
MQLONG DiscInterval; // Disconnect interval |
... but I have no clue on what TCP/IP param (Linux or Windows) can be involved and/or how to change it ..
Any ideas / documentation is welcome, as googl'ing "TCPIP timeout" is not an easy way to go ...
Sebastian. |
|
Back to top |
|
 |
mvic |
Posted: Wed Jun 05, 2013 2:44 pm Post subject: Re: MQCONNX timeout |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
sebastia wrote: |
Is there a way to modify the timeout value for MQCONNX() |
None I know of. If your MQCONNX times out, isn't it OK just to retry the call? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jun 05, 2013 6:08 pm Post subject: Re: MQCONNX timeout |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
mvic wrote: |
sebastia wrote: |
Is there a way to modify the timeout value for MQCONNX() |
None I know of. If your MQCONNX times out, isn't it OK just to retry the call? |
He wants the timeout to occur faster. He doesn't want to wait multiple seconds for a positive or negative reason code for the MQCONNX call, all the while thinking "Is this MQ API call hung? Is it working? How much longer do I have to wait here before I get an answer one way or the other?" _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
sebastia |
Posted: Thu Jun 06, 2013 1:19 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Yes, Peter - you are very right.
We have a VERY FAST network, and waiting 3 seconds is an eternity there.
We want to move to next IP in 1/2 second, if possible (or less).
Sebastian. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jun 06, 2013 4:12 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Do you have SSL involved in your tests?
If you run the test 20 times using amqscnxc does it take the same amount of time to respond each time? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
sebastia |
Posted: Thu Jun 06, 2013 4:38 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
SSL : no, not using it
timeout : yes, I'd say exactly the same |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jun 06, 2013 6:18 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
sebastia |
Posted: Thu Jun 06, 2013 6:21 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
That is a starting point.
I will spend some time folowing the link and the concepts involved.
Thanks, Peter.
Sebastian. |
|
Back to top |
|
 |
PaulClarke |
Posted: Sun Jun 09, 2013 2:35 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
As has already been stated the time it takes for a failed TCP connect is set by OS settings. Usually it is some retry count and a delay. However, you can also tell MQ how long to wait for a TCP connect using the environment variable MQTCPTIMEOUT. If this variable is set then MQ will issue a non-blocking version of connect() and give up waiting for TCP after so many seconds. Don't set the value too low though otherwise you may get false negatives. However, the default TCP settings of around 20 seconds does seem much too long in modern networks
Cheers,
Paul _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
sebastia |
Posted: Mon Jun 10, 2013 1:08 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
>>> MQTCPTIMEOUT ???
First time I hear about it ...
Will investigate its use, of course ...
Thanks a lot.
Sebastia. |
|
Back to top |
|
 |
|