Multi-host Deployment - too much time!

I have several Hosts in the solution.
When I redeploy it, it takes too much time!
Analyzing the log we can see that the most of the delay is by restarting hosts.
"
00006741 2:47:45 PM [2696] Information: Restarting in-process host instances...
00006742 2:47:47 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server BizTalkServerApplication YVRV-BTS55"...
00006743 2:47:47 PM [2696] Before restart: Microsoft BizTalk Server BizTalkServerApplication YVRV-BTS55(Started)
00006744 2:48:47 PM [2696] After stop: Microsoft BizTalk Server BizTalkServerApplication YVRV-BTS55(Stopped)
00006745 2:48:49 PM [2696] After start: Microsoft BizTalk Server BizTalkServerApplication YVRV-BTS55(Started)
00006746 2:48:49 PM [2696] Skipping isolated host instance "Microsoft BizTalk Server BizTalkServerIsolatedHost YVRV-BTS55"...
00006747 2:48:49 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server EDI_to_SQL YVRV-BTS55"...
00006748 2:48:49 PM [2696] Before restart: Microsoft BizTalk Server EDI_to_SQL YVRV-BTS55(Started)
00006749 2:49:49 PM [2696] After stop: Microsoft BizTalk Server EDI_to_SQL YVRV-BTS55(Stopped)
00006750 2:49:51 PM [2696] After start: Microsoft BizTalk Server EDI_to_SQL YVRV-BTS55(Started)
00006751 2:49:51 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server EDIProcessStage1 YVRV-BTS55"...
00006752 2:49:51 PM [2696] Before restart: Microsoft BizTalk Server EDIProcessStage1 YVRV-BTS55(Started)
00006753 2:50:51 PM [2696] After stop: Microsoft BizTalk Server EDIProcessStage1 YVRV-BTS55(Stopped)
00006754 2:50:53 PM [2696] After start: Microsoft BizTalk Server EDIProcessStage1 YVRV-BTS55(Started)
00006755 2:50:53 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server EDIProcessStage2 YVRV-BTS55"...
00006756 2:50:53 PM [2696] Before restart: Microsoft BizTalk Server EDIProcessStage2 YVRV-BTS55(Started)
00006757 2:51:53 PM [2696] After stop: Microsoft BizTalk Server EDIProcessStage2 YVRV-BTS55(Stopped)
00006758 2:51:55 PM [2696] After start: Microsoft BizTalk Server EDIProcessStage2 YVRV-BTS55(Started)
00006759 2:51:55 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server EDIReceive YVRV-BTS55"...
00006760 2:51:55 PM [2696] Before restart: Microsoft BizTalk Server EDIReceive YVRV-BTS55(Started)
00006761 2:52:55 PM [2696] After stop: Microsoft BizTalk Server EDIReceive YVRV-BTS55(Stopped)
00006762 2:52:56 PM [2696] After start: Microsoft BizTalk Server EDIReceive YVRV-BTS55(Started)
00006763 2:52:56 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server TestArtifacts YVRV-BTS55"...
00006764 2:52:57 PM [2696] Before restart: Microsoft BizTalk Server TestArtifacts YVRV-BTS55(Started)
00006765 2:53:57 PM [2696] After stop: Microsoft BizTalk Server TestArtifacts YVRV-BTS55(Stopped)
00006766 2:53:58 PM [2696] After start: Microsoft BizTalk Server TestArtifacts YVRV-BTS55(Started)
00006767 2:53:58 PM [2696] Restarting in-process host instance "Microsoft BizTalk Server Tracking YVRV-BTS55"...
00006768 2:53:58 PM [2696] Before restart: Microsoft BizTalk Server Tracking YVRV-BTS55(Started)
00006769 2:54:59 PM [2696] After stop: Microsoft BizTalk Server Tracking YVRV-BTS55(Stopped)
00006770 2:55:01 PM [2696] After start: Microsoft BizTalk Server Tracking YVRV-BTS55(Started)
00006771 2:55:01 PM [2696] Information: Ending post-update operations for assembly "VPA.CargoServices.EDIInitiative.DangerousGoods, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1abf27c96c0addea".
"
It's disaster to debug the solution with such time lag.Sad(
Any ideas?
Regards,
Leonid Ganeline
http://geekswithblogs.net/leonidganeline/
[4313 byte] By [LeonidGaneline] at [2008-3-6]
# 1

Hi Leonid,

There's a couple of ways to speed things up. I never use the restart hosts option on deploy, it seems to slow things down a lot. I have a batch script to net stop and net start the BizTalk services, and add it as an external tool in VS, and as a button on the toolbar. When I run a deploy, i bounce the hosts at the same time, which is a lot quicker.

Another thing I do is to have a batch script to re-gac the DLLs, which I use when I have made changes to the project that do not affect the content in the MgmtDb. This is so much faster than the redeploy process.

Regards,

Alan

AlanSmithMVP at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 2
Thanks, Alan.
I use the scripts too.
I wander is there something I don't know about this 1-min delays in host restarting.
Why is there an 1-min delay after each host restart, why not after all together?
If this is something inside database layer, then the script approuch should work with the same delays to get reliable result.
Or is it the implementation flaw?
LeonidGaneline at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 3

Hi Leonid,

I've seen this behaviour before. It's is strange.

Do you have any custom adapters or so? Maybe there's a SQL port disconnecting to a remote SQL box that takes ages.

If it's a dev machine - make sure your spool table is close to 4 records as possible. Keep the tracking table/DB lean.

Also just to see if it's your 'environment' create a simple 'hello world' app using for e.g. file adapters. Don't start your 'main app' and see if you experience the slowness upon restart.

Food for thought

MickBadran-MVP at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 4
Hi Mick, thanks for help!
>Do you have any custom adapters or so?
++ Nope. Only out -of-box File and SQL adapters and EDI system.
>Maybe there's a SQL port disconnecting to a remote SQL box that takes ages.
++ Nope. All these hosts are in one VM (Win2K3).
>make sure your spool table is close to 4 records as possible.
++The spool table has about 40 records.
> Also just to see if it's your 'environment' create a simple 'hello world' app using for e.g. file adapters. Don't start your 'main app' and see if you experience the slowness upon restart.
++ Other applications that use one host work fast, no 1-min delays.
I use different hosts to execute sets of orchestrations ans sets of adapter handlers.
I don't think this behaviour is because of too big service tables or something like this. The delays are exactly = 1-min. That means that is something by design (95% Smile I guess) . There could be explanations from Creators [MSFT guys].
LeonidGaneline at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 5
Hi Leonid,

Thanks for the info - the 1-min thing.......I remember Marty (BTS Team) giving us a presentation on multi-hosted bts environment. I dont remember a 1min delay coming into it - but my mind is dim.

There are delays in starting up and reclaiming lost service instances (if the btsntsvc.exe shutdown unexpectedly) - 15 seconds was mentioned upon start up when the host instance was able to start processing messages again, to give a chance for a developer to attach a debugger!

Maybe MS-oftie will provide the magic number answer Smile

MickBadran-MVP at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...