FIX: Shared temporary files may never be deleted if BizTalk, WinSCP and SFTP server remain active

Applies to: BizTalk Server 2016 BranchBizTalk Server 2016 DeveloperBizTalk Server 2016 Enterprise

Symptoms


There are SFTP receive location sessions that occur between Microsoft BizTalk Server 2016, WinSCP, and SFTP server.  While these sessions are active, you may notice that the shared temporary files get larger and are never released or deleted. 

Note The shared temporary files are located in the BizTalk host service account temp folder.

Temporaryfiles may remain locked when connection pooling is used. Connection pooling isautomatically used for connections that have a polling interval that is set to 120 secondsor less. The temporary files contain directory listings and SFTP serveroperations. They can grow large quickly if there are many files that are listed inthe polled SFTP receive location folder and if polling occurs very frequently. Additionally, if the host eventually restarts or crashes, these files may becomeorphaned.

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 

Resolution


This problem is fixed in the following cumulative update for BizTalk Server:

Workaround


To work around the issue, use either of the following methods:
  • Set the receive location polling interval to a larger value than 120 seconds. This change disables connection pooling. SFTP logon and directory listing can take a long time, depending on load, network speed, and the number of files that are listed. You can monitor the SFTP receive location log file to determine how much time this takes.
  • Use dedicated SFTP receive hosts. Also, make sure that you set the BizTalk host instances setting to have enough .NET Framework maximum worker threads to avoid thread starvation and possible locks. The maximum setting of 500 can be used for a dedicated SFTP receive host.  

References


For information about the service packs and cumulative update list for BizTalk Server, see the following article in the Microsoft Knowledge Base:

2555976 Service pack and cumulative update list for BizTalk Server

For more information about BizTalk Server hotfixes, see the following article in the Microsoft Knowledge Base:

2003907 Information about BizTalk hotfixes and Cumulative Update support