Too many running instances and messages - how to do throttling

Hi,

My solution has 2 orchestration, 1 receive port and 1 send port in BizTalk 2010. Receive port (file adaptor) picks up the files and pass it to orchestration A. Orch A split the files into small and pass it to MsgBox. Orchestration B picks up those message, map and pass it to send port.

When i drop many files, i see so many active instances/messages in BizTalk. I want to conrol them. our BizTalk server is clusted and i want to run 10 running orchestration A and 15 running orchestration B in each server at a time. Each orch has its own host instances. How can i configure this? I want this on config level so i can increase or decrease any time based on the server load in the future.

I tried few set up in Resource Base throttiling in Host and no luck. I cannot find any article those explain step by step. Any help?

Thank you in advance.

Siv

August 26th, 2015 2:39pm

Hi,

To control the number of Orcestration instance inside messageBox you can use BizTalk Orchestration Throttling Pattern .

build a helper component which will dictate which throttled instance will be called. Basically, this pattern uses convoy orchestrations. The key is though, that you have multiple convoys running, vs. a true singleton that processes ALL messages.

There is similar approach described in below link

Throttling or Multiton pattern implementation in BizTalk Orchestrations

Limit the Number of Running Orchestration Instances in BizTalk 2004 (though this article provide a sample in BizTalk 2004, you get the idea and implement it in your version of BizTalk)

Limit the number of instances of any BizTalk Service

Thanks

Abhishek

 


Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 2:58pm

Hold on!

Why do you want to do this?  BizTalk Server will do a good job of managing itself.

The only reason to implement some app level throttling pattern is if you have an external resource, that cannot keep up, such as whatever is at the other end of you Send Port.  There is no point in doing 'just because'.

Basically, don't worry about it.

So, before we can give you any advice, what exactly is the problem you're trying to solve.

August 26th, 2015 5:35pm

Hi,

To control the number of Orcestration instance inside messageBox you can use BizTalk Orchestration Throttling Pattern .

build a helper component which will dictate which throttled instance will be called. Basically, this pattern uses convoy orchestrations. The key is though, that you have multiple convoys running, vs. a true singleton that processes ALL messages.

There is similar approach described in below link

Throttling or Multiton pattern implementation in BizTalk Orchestrations

Limit the Number of Running Orchestration Instances in BizTalk 2004 (though this article provide a sample in BizTalk 2004, you get the idea and implement it in your version of BizTalk)

Limit the number of instances of any BizTalk Service

Thanks

Abhishek

 


Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 6:45pm

Hi,

To control the number of Orcestration instance inside messageBox you can use BizTalk Orchestration Throttling Pattern .

build a helper component which will dictate which throttled instance will be called. Basically, this pattern uses convoy orchestrations. The key is though, that you have multiple convoys running, vs. a true singleton that processes ALL messages.

There is similar approach described in below link

Throttling or Multiton pattern implementation in BizTalk Orchestrations

Limit the Number of Running Orchestration Instances in BizTalk 2004 (though this article provide a sample in BizTalk 2004, you get the idea and implement it in your version of BizTalk)

Limit the number of instances of any BizTalk Service

Thanks

Abhishek

 


August 26th, 2015 6:45pm

Hi,

To control the number of Orcestration instance inside messageBox you can use BizTalk Orchestration Throttling Pattern .

build a helper component which will dictate which throttled instance will be called. Basically, this pattern uses convoy orchestrations. The key is though, that you have multiple convoys running, vs. a true singleton that processes ALL messages.

There is similar approach described in below link

Throttling or Multiton pattern implementation in BizTalk Orchestrations

Limit the Number of Running Orchestration Instances in BizTalk 2004 (though this article provide a sample in BizTalk 2004, you get the idea and implement it in your version of BizTalk)

Limit the number of instances of any BizTalk Service

Thanks

Abhishek

 


Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 6:45pm

Thank you for your reply Abhishek, I am wondering if it is possible to control the number of running instance in host setting. In biztalk 2010, Host has setting for throttling. I am trying to use that to control the number running instance or messages. So far no luck. Wondering if you there is away to do it. I am new to BTS 2010.
August 26th, 2015 8:59pm

Hold on!

Why do you want to do this?  BizTalk Server will do a good job of managing itself.

The only reason to implement some app level throttling pattern is if you have an external resource, that cannot keep up, such as whatever is at the other end of you Send Port.  There is no point in doing 'just because'.

Basically, don't worry about it.

So, before we can give you any advice, what exactly is the problem you're trying to solve.

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 9:22pm

Hold on!

Why do you want to do this?  BizTalk Server will do a good job of managing itself.

The only reason to implement some app level throttling pattern is if you have an external resource, that cannot keep up, such as whatever is at the other end of you Send Port.  There is no point in doing 'just because'.

Basically, don't worry about it.

So, before we can give you any advice, what exactly is the problem you're trying to solve.

August 26th, 2015 9:22pm

Hold on!

Why do you want to do this?  BizTalk Server will do a good job of managing itself.

The only reason to implement some app level throttling pattern is if you have an external resource, that cannot keep up, such as whatever is at the other end of you Send Port.  There is no point in doing 'just because'.

Basically, don't worry about it.

So, before we can give you any advice, what exactly is the problem you're trying to solve.

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 9:22pm

Hi John,

Here is the current app as i said above:

My solution has 2 orchestration, 1 receive port and 1 send port in BizTalk 2010. Receive port (file adaptor) picks up the files and pass it to orchestration A. Orch A split the files into small and pass it to MsgBox. Orchestration B picks up those message, map and pass it to send port.

When i drop many files, i see so many active instances/messages in BizTalk. I want to conrol them. our BizTalk server is clusted and i want to run 10 running orchestration A and 15 running orchestration B in each server at a time. Each orch has its own host instances. How can i configure this? I want this on config level so i can increase or decrease any time based on the server load in the future.

Issue:

If i receive 1000 batched files from customers, receive locations picks up all. 1000 Orchestration A become active (running) and debatching the files. - I need to control this since it is slowing down other apps and also we want control over how many orch A should be active at a given time.

If each file has 50 items, then over 1000s of item get publish to msgbox and over 1000s Orchestration become active to process those item msg. We want similar control as above.

Then over 1000 https calls made to the web and slowing the web. This web is external. So i want to put control in all 3 places to ensure we can dictate the number of active instances.

Can we do this using Host? It look like Host in BTS 2010 has parameter to set this. I played around and no luck so far.

siv

August 26th, 2015 9:25pm

If you are looking to control number of message flow through  file adapter ,then better option is to create a C# assembly which will read fixed number of batch files and put them inside BizTalk processing folder . 

You can try something like below . Copy only batch of 5 or 10 at time

const string sourceDir = @"C:\AbhishekData\Sample\document";
const string target = @"C:\AbhishekData\BizTalk\document";
foreach (var file in Directory.GetFiles(sourceDir))
    File.Copy(file, Path.Combine(targetDir, Path.GetFileName(file)), true);

You can also take reference from below MSDN article

https://msdn.microsoft.com/en-us/library/vstudio/cc148994(v=vs.100).aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 1:55am

Hi Wat Nxt,

As you said:

My solution has 2 orchestration, 1 receive port and 1 send port in BizTalk 2010. Receive port (file adaptor) picks up the files and pass it to orchestration A. Orch A split the files into small and pass it to MsgBox. Orchestration B picks up those message, map and pass it to send port.

Why dont you try a simpler and efficient solution here ..

Ur Receive port will pick the message and debatch (Use Envelope schema ..it does this for u) at ur pipeline . The debatched message can be subscribed at a send port based on ur debatched schema messagetype and use a port map on the send port (The map u r using in Orch B) and send it thru. U can have a full messaging only solution for this and performance and oprimization gain would be a lot for u not to worry about other processes.

August 27th, 2015 2:19am

If you are looking to control number of message flow through  file adapter ,then better option is to create a C# assembly which will read fixed number of batch files and put them inside BizTalk processing folder . 

You can try something like below . Copy only batch of 5 or 10 at time

const string sourceDir = @"C:\AbhishekData\Sample\document";
const string target = @"C:\AbhishekData\BizTalk\document";
foreach (var file in Directory.GetFiles(sourceDir))
    File.Copy(file, Path.Combine(targetDir, Path.GetFileName(file)), true);

You can also take reference from below MSDN article

https://msdn.microsoft.com/en-us/library/vstudio/cc148994(v=vs.100).aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 5:43am

If you are looking to control number of message flow through  file adapter ,then better option is to create a C# assembly which will read fixed number of batch files and put them inside BizTalk processing folder . 

You can try something like below . Copy only batch of 5 or 10 at time

const string sourceDir = @"C:\AbhishekData\Sample\document";
const string target = @"C:\AbhishekData\BizTalk\document";
foreach (var file in Directory.GetFiles(sourceDir))
    File.Copy(file, Path.Combine(targetDir, Path.GetFileName(file)), true);

You can also take reference from below MSDN article

https://msdn.microsoft.com/en-us/library/vstudio/cc148994(v=vs.100).aspx

Thanks

Abhishek

August 27th, 2015 5:43am

If you are looking to control number of message flow through  file adapter ,then better option is to create a C# assembly which will read fixed number of batch files and put them inside BizTalk processing folder . 

You can try something like below . Copy only batch of 5 or 10 at time

const string sourceDir = @"C:\AbhishekData\Sample\document";
const string target = @"C:\AbhishekData\BizTalk\document";
foreach (var file in Directory.GetFiles(sourceDir))
    File.Copy(file, Path.Combine(targetDir, Path.GetFileName(file)), true);

You can also take reference from below MSDN article

https://msdn.microsoft.com/en-us/library/vstudio/cc148994(v=vs.100).aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 5:43am

Ok, I read two specific issues that you need to address:

1. "it is slowing down other apps"

2. "slowing down the web"

You said the Orchestrations are in their own Hosts.  Does the Send Port have a dedicated Host as well?  Let's go with yes.

The first thing you should try is lowering the "Maximum worker threads" Host Instance settings for the Orchestration hosts.  Keep in mind, BT Admin may show many more Orchestrations in Active state, but that does not necessarily mean they are running.  To see how many are actually running at any given time, you have to look at the XLANG/x Orchestrations/Running Orchestrations Performance Counter.  That will never exceed the max thread value.

One the Send Port, a very simple option is setting Ordered Delivery, this is usually a perfectly serviceable solution if the processes are not too time dependent.

Not, most importantly, you will have to test and tune many times.  Take it slow and cautious.

August 27th, 2015 7:06am

Ok, I read two specific issues that you need to address:

1. "it is slowing down other apps"

2. "slowing down the web"

You said the Orchestrations are in their own Hosts.  Does the Send Port have a dedicated Host as well?  Let's go with yes.

The first thing you should try is lowering the "Maximum worker threads" Host Instance settings for the Orchestration hosts.  Keep in mind, BT Admin may show many more Orchestrations in Active state, but that does not necessarily mean they are running.  To see how many are actually running at any given time, you have to look at the XLANG/x Orchestrations/Running Orchestrations Performance Counter.  That will never exceed the max thread value.

One the Send Port, a very simple option is setting Ordered Delivery, this is usually a perfectly serviceable solution if the processes are not too time dependent.

Not, most importantly, you will have to test and tune many times.  Take it slow and cautious.

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 11:01am

Ok, I read two specific issues that you need to address:

1. "it is slowing down other apps"

2. "slowing down the web"

You said the Orchestrations are in their own Hosts.  Does the Send Port have a dedicated Host as well?  Let's go with yes.

The first thing you should try is lowering the "Maximum worker threads" Host Instance settings for the Orchestration hosts.  Keep in mind, BT Admin may show many more Orchestrations in Active state, but that does not necessarily mean they are running.  To see how many are actually running at any given time, you have to look at the XLANG/x Orchestrations/Running Orchestrations Performance Counter.  That will never exceed the max thread value.

One the Send Port, a very simple option is setting Ordered Delivery, this is usually a perfectly serviceable solution if the processes are not too time dependent.

Not, most importantly, you will have to test and tune many times.  Take it slow and cautious.

August 27th, 2015 11:01am

Ok, I read two specific issues that you need to address:

1. "it is slowing down other apps"

2. "slowing down the web"

You said the Orchestrations are in their own Hosts.  Does the Send Port have a dedicated Host as well?  Let's go with yes.

The first thing you should try is lowering the "Maximum worker threads" Host Instance settings for the Orchestration hosts.  Keep in mind, BT Admin may show many more Orchestrations in Active state, but that does not necessarily mean they are running.  To see how many are actually running at any given time, you have to look at the XLANG/x Orchestrations/Running Orchestrations Performance Counter.  That will never exceed the max thread value.

One the Send Port, a very simple option is setting Ordered Delivery, this is usually a perfectly serviceable solution if the processes are not too time dependent.

Not, most importantly, you will have to test and tune many times.  Take it slow and cautious.

  • Proposed as answer by Arindam Paul Roy Friday, August 28, 2015 5:26 AM
  • Marked as answer by WatNxt 13 hours 51 minutes ago
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 11:01am

Ok, I read two specific issues that you need to address:

1. "it is slowing down other apps"

2. "slowing down the web"

You said the Orchestrations are in their own Hosts.  Does the Send Port have a dedicated Host as well?  Let's go with yes.

The first thing you should try is lowering the "Maximum worker threads" Host Instance settings for the Orchestration hosts.  Keep in mind, BT Admin may show many more Orchestrations in Active state, but that does not necessarily mean they are running.  To see how many are actually running at any given time, you have to look at the XLANG/x Orchestrations/Running Orchestrations Performance Counter.  That will never exceed the max thread value.

One the Send Port, a very simple option is setting Ordered Delivery, this is usually a perfectly serviceable solution if the processes are not too time dependent.

Not, most importantly, you will have to test and tune many times.  Take it slow and cautious.

  • Proposed as answer by Arindam Paul Roy Friday, August 28, 2015 5:26 AM
  • Marked as answer by WatNxt Wednesday, September 02, 2015 5:15 PM
August 27th, 2015 11:01am

Thank you Pi xel, As you said, i Orchestration A (which picks up the physical file) works based not Maxmimum woker threads. Orchestration B which subscribe the message from Messagebox is not working based on Maximum worker threads. It consuming all debatched messages and sending to WCF_basic HTTP send port. I am trying to make this work now.

i have separate host for send port here.

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 7:14pm

Thank you Abhishek,

.NET CLR set up helped me.

August 28th, 2015 11:31am

Hi Pi

i cannot use envelope schema since my input can be different xml structure and complex schemas. Including X12. Custoemr can send PO in ST level or different ISA. It is bit hard and i deceide to go with coding, not debatching using evelop.

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 11:36am

Thank you John,

My orchestration B has request/response send port. I notice that Orchestraton goes dehydrate for a sec or less before it complete, no failure. I have delivery notificate transmited in Req/Res port. I guess orch goes to dehydrate since it need to wait for response eventhough it gets the response very fast. Is there way to avoid orch B going to dehydrate or let be active for 5 sec before it goes to dehydrate?

August 28th, 2015 11:41am

you can split in Orchestration A and assign a instance ID, submit to message box. Create Orchestration B as Singleton orchestration which takes a message from A then call web service.  
Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 11:22pm

Is there way to avoid orch B going to dehydrate or let be active for 5 sec before it goes to dehydrate?

As I mentioned in the other thread, don't worry about it.

Since there is already a Persistence Point on the Send Shape, re-hydration (if it's actually happening) is a relatively small part that is done at the same time as the Receive Shape.

There are other optimizations that would be much more beneficial.

August 30th, 2015 8:40am

Thank you Mahesh and my solutions is already have similar to your advise. Thank you.

Free Windows Admin Tool Kit Click here and download it now
August 30th, 2015 1:45pm

Thank you John. I will check the send port -host setting to see if i can limit the number or connection to web. Web team is complaining BTS is sending too many connection at a time and want us to control it. I tried to do it by orche B. It is not helping since it goes to dehydrate for a sec and so many new orch b become active at that time. So we end up creating so many web calls. I think i should check if i can control it by send port.
August 30th, 2015 1:49pm

Hi WatNxt, I think you accidentally cross-posted your answers.

Just to mention it here, the number of concurrent web calls and the dehydration you're seeing are not related in any way.  The two processes are totally unaware and unaffected by each other.

Free Windows Admin Tool Kit Click here and download it now
August 30th, 2015 7:35pm

Hi WatNxt, I think you accidentally cross-posted your answers.

Just to mention it here, the number of concurrent web calls and the dehydration you're seeing are not related in any way.  The two processes are totally unaware and unaffected by each other.

  • Marked as answer by WatNxt 13 hours 50 minutes ago
August 30th, 2015 11:31pm

Hi WatNxt, I think you accidentally cross-posted your answers.

Just to mention it here, the number of concurrent web calls and the dehydration you're seeing are not related in any way.  The two processes are totally unaware and unaffected by each other.

  • Marked as answer by WatNxt Wednesday, September 02, 2015 5:16 PM
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2015 11:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics