Sunday, January 20, 2008

BizTalk Host instance and Windows NT Services limit issue

When developing SOA/ESB solutions, you should NOT use the same Host instance for more then one service. the reason is because all messages will be writen into the same table (queue), so if one service is consumed intensively, the other services will experience latency.

To avoid this, it's a known best-practice with BizTalk solutions, to create at least 3 Hosts instances per service:

  • Orchestrations Host
  • Receive Ports Handler
  • Send Handler

An important and little known issue is the limit number of host instances that can be defined on a single machine.

Every host instance in BizTalk is implemented as a Window NT Service with the prefix 'BizTalk Service BizTalk Group : 'HostName'.

Now, services can run under one of two Accounts:

  • User Account
  • LocalSystem

Windows can host unlimited number of services running under LocalSystem, but By Default, has a limit number of services running under User Account (from my experience with Windows 2003 Server it's between 23 to 25, based on the service memory usage).

If you reach this limit, the host instance won't start and you'll get the following error massage:

1053 The service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

The only solution is to decrease the memory for each desktop on the computer.

In the following I'll show you how to set this key in the system registery:

Run regedit.exe and browse to:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

Find the key 'SharedSection=1024,3072,512'

The third value (512) is the desktop heap for each desktop that is associated with a "noninteractive" window station. this value can be decreased down to 128.

More information can be found on (cause 2).

Very important:

Please DON’T do this on production environment before a VERY CARFUL test – this key can affected and harm the system very badly. So please check if it suitable for your system before running and applying it.

Copyright © 2007 | Diseñado por Blog and Web