ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » connection problems

Post new topic  Reply to topic
 connection problems « View previous topic :: View next topic » 
Author Message
madkak
PostPosted: Sat Sep 03, 2016 11:56 pm    Post subject: connection problems Reply with quote

Newbie

Joined: 11 May 2013
Posts: 4

Split from http://www.mqseries.net/phpBB2/viewtopic.php?t=55987&start=15

I think this is the right context where i can post my issue on channel 'handle state' issue.

My app is running on 20servers using the same mq connection properties. I could see only 15 apps consuming the data from the queue where as i could see 20 'open input count'. after some research, i identified that 5 of them are actually INACTIVE under 'handle State' tab. Can someone help me whey they are inactive? When i restart the app, its establishing the active connection but after some time either the same connection of some other connection going 'inactive'. Can someone help me what can be done to keep all the connection 'active'?
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Sun Sep 04, 2016 2:15 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Hi,

Well if you have five connections which say they are HSTATE(INACTIVE) then that just implies that the client is not currently issuing an MQI call (such as MQGET). Is it possible that these are just processing a message at this time ? The ones that are HSTATE(ACTIVE) are the ones that are sitting waiting for a message. HSTATE(INACTIVE) does not in of itself imply any sort of error.

What is the message load at this point ? How many messages are you processing ? Do you always see the same 5 handles as inactive? When the input queue is empty do you see all handles returning HSTATE(ACTIVE) ? This is perhaps the only time you'd expect to see them all active.

Cheers,

Paul
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
madkak
PostPosted: Sun Sep 04, 2016 3:55 am    Post subject: Reply with quote

Newbie

Joined: 11 May 2013
Posts: 4

There is no much load but 1 message means a lot for one app instance. This message is a trigger for lot of records to process. Assume like 1 message will be processed in 5min by one app. I want these messages to be processed by all the apps in round robin fashion. But few apps (for which the HSTATE is inactive)are not at all getting messages to process. 5 handles being inactive is more or less same but different machines at different times. Let me know if you need more information. Thanks.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Sun Sep 04, 2016 10:13 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

So, from what you say, it is not clear that anything is amiss.

If you have 20 applications all trying to consume from the same queue and then put 20 messages to the queue. It is highly likely that only some of the messages will get a message. If you put the messages one every second then it is possible that only one application will only ever see a message. The reason is that MQ will favour giving messages to applications that have recently been active. In other words it will try to keep threads as hot as possible. The reason is that it is more efficient this way. Is is better to have one thread very active than to be constantly switching between threads (known as context switching). as you increase the workload you will find that more and more threads get involved because MQ can't give it to the 'same' thread because it is still processing the last message. If you continue to increase the workload you could/should find that you start to get all 20 threads active. The topic of hot threads has been discussed a number of times before, including I believe, how to switch it off.

Is it possible that in your case you just aren't driving the test hard enough ?

By the way I see no reason why this question has been raised on an old, 'solved' forum append. You may get more responses if you raised this as a new topic,

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
madkak
PostPosted: Mon Sep 05, 2016 9:32 am    Post subject: Reply with quote

Newbie

Joined: 11 May 2013
Posts: 4

Is there a way to keep this 'Handle State' active all the time? Or this is something MQ handles internally?
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Mon Sep 05, 2016 12:54 pm    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Tell you what....let's read what it says about HSTATE(ACTIVE) from the manual.....

Quote:
An API call from a connection is currently in progress for this object. For a queue, this condition can arise when an MQGET WAIT call is in progress.
If there is an MQGET SIGNAL outstanding, then this value does not mean, by itself, that the handle is active.


So, you are asking "is it possible, on a single thread, for this to remain active all the time?'. In other words, you are looking for a way for this thread to stay in an MQGET call and never come out.

Are you sure this is something you want?

As I said before it is not clear there is a problem here. What do you think your problem is ? It just sounds like you think the words 'ACTIVE' is good and 'INACTIVE' is bad. It's not like that at all. For ACTIVE substitute 'WAITING_FOR_MESSAGE' and for INACTIVE substitute 'PROCESSING_MESSAGE', then it sounds like a good thing doesn't it?

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
vishBroker
PostPosted: Tue Sep 06, 2016 6:04 am    Post subject: Reply with quote

Centurion

Joined: 08 Dec 2010
Posts: 135

Can you tell - how many messages are on the queue? I do not think, the messages are getting piled up or anything.

If you have - say 20 threads reading from the queue and you put 20 messages - it is not guaranteed that every thread will get one message. It depends on how messages are getting consumed.

If your requirement is to make sure- same message it received by all the 20 consumers - then you might want to think about PUB-SUB model.

Can you run DISPLAY QSTATUS command on the queue in the question.
Run it for TYPE(QUEUE) and TYPE(HANDLE).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » connection problems
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.