BizTalk Host Instance stuck in “Stop pending” state when trying to restart the instance

Posted: January 10, 2013  |  Categories: Administration BizTalk

Last week I have encountered an unusual situation in my BizTalk Server 2010 production environment… when I was trying to restart BizTalk Host Instance after publishing a small change in one of my applications, one of the host instances got stuck in “Stop pending” state.

host instance state

The major problem of this stage is that we cannot perform any kind of operations on it through the BizTalk Server Administration Console or Service window

services windows


Well, unfortunately, I don’t know exactly why this problem has occurred, but I came across these posts:

And I believe that this problem was due to the deploy, unfortunately, and against my suggestions, the client had not installed the latest CU (I think that the last CU installed, was the CU2)


First of all, I suggest that you install the latest CU available.

But because this was a production environment and I needed to solve the problem quickly the solution to solve this problem is to kill the process via Windows Task Manager! Is not an elegant solution, I know and please avoid doing it.

Then go to BizTalk Server Administration Console or Service window and start the process.

Another precaution that you must have if you have multiple Host Instances, is to know what is the process id of the host instance in order to terminate the correct one, you can accomplish this following the steps in this post:

Related links:

#1 all-in-one platform for Microsoft BizTalk Server management and monitoring
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

10 thoughts on “BizTalk Host Instance stuck in “Stop pending” state when trying to restart the instance”

  1. Another useful way to determine the PID of the service is to use the sc queryex {servicename} command which returns like this;

    sc queryex BTSSvc$BizTalkServerApplication

    SERVICE_NAME: BTSSvc$BizTalkServerApplication
    WIN32_EXIT_CODE : 0 (0x0)
    SERVICE_EXIT_CODE : 0 (0x0)
    CHECKPOINT : 0x0
    WAIT_HINT : 0x0
    PID : 11116
    FLAGS :

    The SC command also supports the continue command

    C:>sc continue
    Sends a CONTINUE control request to a service.
    sc continue [service name]

    This sometimes forces a service in a pending state to complete the pending operation.

      1. The (possible) cause
        Stop pending error is reproducible. I have observed it after delivery notification could not have been delivered from send port to caller orchestration (i.e. orchestration stops existing before send port succesfully sends the message). Such send port would not exit properly and leave its service instance “active” forever (this is btw visible in BizTalk administration console). That would then cause issue when you restart host instance (probably BizTalk has a problem serializing that service instance). I have observed such behaviour in FTP send port, while FILE send port works fine in this situation.

        1. I have an orchestration with delivery notification set on a send port. Message is sent by the send port using FTP adapter. FTP transmission fails because password is incorrect. Orchestration catches DeliveryException, logs it and then finishes.

        In administration console I can still see that the not delivered message is suspended on the send port. I adjust password on FTP server. Then I resume the message. Message is delivered to FTP location succesfully and delivery notification is sent again, but the orchestration is already gone. Service instance remains “active”.

        2. You can also observe this error when you have delivery notification in orchestration, but unaware of that you send your message via send port group to 2 send ports (FTP adapter). Then 2 delivery notifications will be created. If both delivery notifications are fast enough your orchestration will exit with 1 non consumed message. But if second notification is created after orchestration has exited there are no subscribers waiting for it anymore and send port remains in “active” state.

        BizTalk Server 2006 would suspend such service instance gracefully so I think this issue is actually a bug in BizTalk Server 2010.

    1. PID is also available under Process tab, but you have to select this column. The great advantage of Services tab is that you actually can see the host instance name, this way you can kill the right process in the processes tab… excellent tip Sonya.

    2. Hi Sonya, again get tip but unfortunately Services tab is only available starting from windows server 2008, so if you are using other SO you have to use another approach to check the PID.

      1. Thank you Sandro,

        I have used that approach since it is the fasted way to kill a BizTalk instance or find the right process to attach to while debugging. I didn’t know it is a new feature of 2008 OS. Thank you for your note It is really useful.

  2. We had a similar issue in production but with BizTalk 2009 and the latest CU patched. We found that the root cause was a broken connection to SQL whilst stopping the host instance. The only way forward was to reboot the box as killing the process did not work.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to Top