Max worker threads for SFTP, MQSC or DB and in BizTalk

A about March or earlier, the latest rules for BizTalk Health Monitor started to show the following important warning.

BizTalk Health Monitor Important warning – The host instances of ‘ReceivingSFTP’ need more worker threads per cpu to run correctly SFTP Receive Locations. Increase so the “Maximum Worker Threads” property to 500 for these host instances and be sure they are dedicated for this SFTP Receive Locations

I had already been advising clients to run SFTP receive locations on a separate host instance due to issues where it would silently stop receiving requiring a host instance restart to resolve, possibly related to FIX: SFTP adapter receive locations stop working intermittently during higher load in BizTalk Server

BHM rule 637 – Suggest to Increase MaxWorkerThreads for SFTP, MQSC or DB2 Receive Locations

The rule itself also talks about MQSC and DB, but as I didn’t have any receive locations for those it was only warning about SFTP.

I’ve seen that warning even on a BizTalk 2010 environment that has a Custom SFTP adapter installed, possibly because it was also called simply SFTP. However it does not warn about third party SFTP adapters such as the nSoftware one which has a different name.

BizTalk Host Instance Settings – Maximum worker threads.

However, even after changing the Max worker threads to 500 and restarting the Host Instance and re-running BHM, the warning did not go away. Even moving the receive locations running on the nSoftware onto another host instance, and un-configuring the adapter on that host instance didn’t make any difference.

The BizTalk adapter’s default configuration is to poll every 5 seconds. This is rather excessive and should be reduced.

Recommendations for SFTP Receive Locations

  1. Have a dedicated host for receive locations using SFTP
  2. Increase the Maximum Worker threads setting to 500 on that host instance
  3. Check how frequently you poll (the default is 5 seconds)
  4. Put a schedule on to only poll during the periods you need.
  5. Disable message body tracking if it is not needed.

Author: Coen (Colin) Dijkgraaf

A Integration Consultant for Datacom in Auckland, New Zealand, working mainly with BizTalk and Azure. You can follow me on Twitter, StackOverflow and WordPress

One thought on “Max worker threads for SFTP, MQSC or DB and in BizTalk”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.