locked
Biztalk configuration for setting SecondsIdleBeforeShutdown=-1 is not working RRS feed

  • Question

  • Hi, I am facing a problem that when ever the biztalk server goes idle for more than 20mins, it always takes longer time in processing first request.

    I am calling some .net assemblies inside those orchestration.

    I went through following links:

    http://msdn.microsoft.com/en-us/library/aa578610(BTS.10).aspx

    http://social.msdn.microsoft.com/Forums/sk/biztalkgeneral/thread/0bc7b005-fce9-4110-b01b-3b23359cca7a

    and put following configuratiion settings into BizTalk configuration file.

    <xlangs>
        <Configuration>
           <AppDomains AssembliesPerDomain="25">
            <DefaultSpec SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1">
            </DefaultSpec>
          </AppDomains>
        </Configuration>
      </xlangs>

    I have not defined any appdomain (basically I fon't know how to do that) so I have used the default appdomain.

    But this configuration is not working for me. After doing this I am not able to start Host Instance. 

    Please help me on this.


    -- Sagar Sharma

    Friday, May 18, 2012 3:41 AM

Answers

  • Hi

    Could you try below now? and let us know if you face any issues

    <?xml version="1.0" ?>
    <configuration>
    <configSections>
                  <section      name="xlangs"                      type="Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess"              />
           </configSections>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking;Tracking\interop" />
            </assemblyBinding>
        </runtime>
        
        <system.runtime.remoting>
        
            <channelSinkProviders>
                <serverProviders>
                    <provider id="sspi" type="Microsoft.BizTalk.XLANGs.BTXEngine.SecurityServerChannelSinkProvider,Microsoft.XLANGs.BizTalk.Engine" securityPackage="ntlm" authenticationLevel="packetPrivacy" />
                </serverProviders>
            </channelSinkProviders>
        
            <application>
                <channels>
                    <channel ref="tcp" port="0" name="">
    	                <serverProviders>
    	                    <provider ref="sspi" />
                            <formatter ref="binary" typeFilterLevel="Full"/>
                        </serverProviders>
                    </channel>
                </channels>
            </application>
        </system.runtime.remoting>
        <xlangs>
    		<Configuration>
    			<AppDomains AssembliesPerDomain="50">
    				<AppDomainSpecs>
    					<AppDomainSpec Name="YouAppDomainName" SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1">
    					</AppDomainSpec>
    				</AppDomainSpecs>
    				<ExactAssignmentRules>
    					<ExactAssignmentRule AssemblyName="Microsoft.Practices.ESB.Adapter.FILE, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" AppDomainName="YouAppDomainName" />
    				</ExactAssignmentRules>
    			</AppDomains>
    		</Configuration>
    	</xlangs>
    </configuration>


    HTH,
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com
    My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"

    • Marked as answer by Sagar Sharma Friday, May 18, 2012 10:54 AM
    Friday, May 18, 2012 10:25 AM
    Moderator

All replies

  • Hi

    Could you please try below:

     <xlangs>
            <Configuration>
                <AppDomains AssembliesPerDomain="50">
                    <AppDomainSpecs>
                        <AppDomainSpec Name="YouAppDomainName" SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1">
                        </AppDomainSpec>
                    </AppDomainSpecs>
    				<ExactAssignmentRules>
                        <ExactAssignmentRule AssemblyName="BTSAssembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c7731c5584592ad AssemblyName_0" AppDomainName="YouAppDomainName" />
    					</ExactAssignmentRules>
                </AppDomains>
            </Configuration>
        </xlangs>

    You can replace "YourAppdomainName" with anu suitable name for your app domain. Also make sure you have one record for each of your assembly which you want to assign to the appdomain. Make sure the Name and Key are correct.

    Try it and feel free to post if you need further information.


    HTH,
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com
    My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"

    Friday, May 18, 2012 8:28 AM
    Moderator
  • Hi Naushad, Thanks for the reply. Before I give it a try I just wanted to know one thing. I want only one appDomain to avoid complexity. So how can I specify multiple assembly names under one appDomain Or There are some another setting through which I can assign all assemblies to one appDomain.

    And what if I don't specify appDomain for one or more assemblies.

    Thanks for your response.

      

    -- Sagar Sharma

    Friday, May 18, 2012 8:52 AM
  • There are some another setting through which I can assign all assemblies to one appDomain. --> you can have multiple "ExactAssignmentRule" for each assembly you want to assign for that appdomain.

    <ExactAssignmentRules>
                        <ExactAssignmentRule AssemblyName="BTSAssembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c7731c5584592ad AssemblyName_0" AppDomainName="YouAppDomainName" />
    					<ExactAssignmentRule AssemblyName="BTSAssembly2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c7731c5584592ad AssemblyName_0" AppDomainName="YouAppDomainName" />
    					<ExactAssignmentRule AssemblyName="BTSAssembly3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9c7731c5584592ad AssemblyName_0" AppDomainName="YouAppDomainName" />
    				</ExactAssignmentRules>

    And what if I don't specify appDomain for one or more assemblies -->  IMHO Then you would not be able to control the unloading of the assemblies.


    HTH,
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com
    My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"

    Friday, May 18, 2012 9:06 AM
    Moderator
  • Hi Naushad,

    Thanks for your quick response. I tried with following settings but not able to start host instance.

    	<xlangs>
    		<Configuration>
    			<AppDomains AssembliesPerDomain="50">
    				<AppDomainSpecs>
    					<AppDomainSpec Name="YouAppDomainName" SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1">
    					</AppDomainSpec>
    				</AppDomainSpecs>
    				<ExactAssignmentRules>
    					<ExactAssignmentRule AssemblyName="Microsoft.Practices.ESB.Adapter.FILE, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" AppDomainName="YouAppDomainName" />
    				</ExactAssignmentRules>
    			</AppDomains>
    		</Configuration>
    	</xlangs>


    -- Sagar Sharma

    Friday, May 18, 2012 9:50 AM
  • Could you send your complete BizTalk config file?

    HTH,
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com
    My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"

    Friday, May 18, 2012 9:56 AM
    Moderator
  • <?xml version="1.0" ?>
    <configuration>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking;Tracking\interop" />
            </assemblyBinding>
        </runtime>
    
    	<xlangs>
    		<Configuration>
    			<AppDomains AssembliesPerDomain="50">
    				<AppDomainSpecs>
    					<AppDomainSpec Name="YouAppDomainName" SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1">
    					</AppDomainSpec>
    				</AppDomainSpecs>
    				<ExactAssignmentRules>
    					<ExactAssignmentRule AssemblyName="Microsoft.Practices.ESB.Adapter.FILE, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" AppDomainName="YouAppDomainName" />
    				</ExactAssignmentRules>
    			</AppDomains>
    		</Configuration>
    	</xlangs>
        
        <system.runtime.remoting>
        
            <channelSinkProviders>
                <serverProviders>
                    <provider id="sspi" type="Microsoft.BizTalk.XLANGs.BTXEngine.SecurityServerChannelSinkProvider,Microsoft.XLANGs.BizTalk.Engine" securityPackage="ntlm" authenticationLevel="packetPrivacy" />
                </serverProviders>
            </channelSinkProviders>
        
            <application>
                <channels>
                    <channel ref="tcp" port="0" name="">
    	                <serverProviders>
    	                    <provider ref="sspi" />
                            <formatter ref="binary" typeFilterLevel="Full"/>
                        </serverProviders>
                    </channel>
                </channels>
            </application>
        </system.runtime.remoting>
        
    </configuration>
    


    -- Sagar Sharma

    Friday, May 18, 2012 10:13 AM
  • Hi

    Could you try below now? and let us know if you face any issues

    <?xml version="1.0" ?>
    <configuration>
    <configSections>
                  <section      name="xlangs"                      type="Microsoft.XLANGs.BizTalk.CrossProcess.XmlSerializationConfigurationSectionHandler, Microsoft.XLANGs.BizTalk.CrossProcess"              />
           </configSections>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking;Tracking\interop" />
            </assemblyBinding>
        </runtime>
        
        <system.runtime.remoting>
        
            <channelSinkProviders>
                <serverProviders>
                    <provider id="sspi" type="Microsoft.BizTalk.XLANGs.BTXEngine.SecurityServerChannelSinkProvider,Microsoft.XLANGs.BizTalk.Engine" securityPackage="ntlm" authenticationLevel="packetPrivacy" />
                </serverProviders>
            </channelSinkProviders>
        
            <application>
                <channels>
                    <channel ref="tcp" port="0" name="">
    	                <serverProviders>
    	                    <provider ref="sspi" />
                            <formatter ref="binary" typeFilterLevel="Full"/>
                        </serverProviders>
                    </channel>
                </channels>
            </application>
        </system.runtime.remoting>
        <xlangs>
    		<Configuration>
    			<AppDomains AssembliesPerDomain="50">
    				<AppDomainSpecs>
    					<AppDomainSpec Name="YouAppDomainName" SecondsIdleBeforeShutdown="-1" SecondsEmptyBeforeShutdown="-1">
    					</AppDomainSpec>
    				</AppDomainSpecs>
    				<ExactAssignmentRules>
    					<ExactAssignmentRule AssemblyName="Microsoft.Practices.ESB.Adapter.FILE, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" AppDomainName="YouAppDomainName" />
    				</ExactAssignmentRules>
    			</AppDomains>
    		</Configuration>
    	</xlangs>
    </configuration>


    HTH,
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com
    My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"

    • Marked as answer by Sagar Sharma Friday, May 18, 2012 10:54 AM
    Friday, May 18, 2012 10:25 AM
    Moderator
  • Thanks Naushad,

    The XmlSerializationConfigurationSectionHandler worked for me. Now I just need to check where that idle problem is getting solve or not. Thanks a lot.


    -- Sagar Sharma

    Friday, May 18, 2012 10:54 AM