none
System.InvalidOperationException: There were not enough free threads in the ThreadPool to complete the operation RRS feed

  • Question

  • Dear All,

    My Dev Environment all of a sudden started giving errors for all WCF Send Operations:

    System.InvalidOperationException: There were not enough free threads in the ThreadPool to complete the operation

    Steps we have taken so far:

    Run MBV, got some orphaned instances, used terminator tool to get rid of them.

    Segregated the Host Instances.

    SQL Job is all up and Running.

    BizTalk databases are in full control.

    Increased the max connection from config file to 12.

    I also noticed that my BizTalk server is now processing the requests very slowly:

    Regards,

    Vikingsss

    Friday, January 6, 2017 11:31 AM

Answers

  • Hi Vikingss,

    I have faced the same problem. I have created a separate host instance for Orchestration( depends on the destination system for eg: if i connect to SQL, WCF service i have created SQLOrchHost and WCFOrchHost) , receive port, send port.

    Once we create a separate host instance the memory will be splitted and the process will be fast and we won't get this issue.

    I didn't faced this issue after doing the above changes.


    Regards, Aboorva Raja R Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 6, 2017 11:53 AM
  • Hi 

    You can increase the Max worker threads for the Host Instance(s) involved to a higher value, say 250. Also, you should increase the Min worker threads value to something like 100.

    After the change, you have to restart the Host Instance(s) involved. Remember that this is a Host Instance setting, and not a Host setting. Right-click BizTalk Group -> Settings -> Host Instances tab -> .NET CLR tab -

    https://msdn.microsoft.com/en-us/library/ff629678.aspx


    Thanks Arindam


    Friday, January 6, 2017 12:36 PM
    Moderator
  • Hi,

    You can refer the thread below for the steps :

    https://biztalktalk.wordpress.com/2012/10/17/thread-starvation-in-wcf-send-port/

    Thanks

    Abhishek


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Friday, January 6, 2017 1:22 PM

All replies

  • Hi Vikingss,

    I have faced the same problem. I have created a separate host instance for Orchestration( depends on the destination system for eg: if i connect to SQL, WCF service i have created SQLOrchHost and WCFOrchHost) , receive port, send port.

    Once we create a separate host instance the memory will be splitted and the process will be fast and we won't get this issue.

    I didn't faced this issue after doing the above changes.


    Regards, Aboorva Raja R Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 6, 2017 11:53 AM
  • Hi 

    You can increase the Max worker threads for the Host Instance(s) involved to a higher value, say 250. Also, you should increase the Min worker threads value to something like 100.

    After the change, you have to restart the Host Instance(s) involved. Remember that this is a Host Instance setting, and not a Host setting. Right-click BizTalk Group -> Settings -> Host Instances tab -> .NET CLR tab -

    https://msdn.microsoft.com/en-us/library/ff629678.aspx


    Thanks Arindam


    Friday, January 6, 2017 12:36 PM
    Moderator
  • Hi,

    You can refer the thread below for the steps :

    https://biztalktalk.wordpress.com/2012/10/17/thread-starvation-in-wcf-send-port/

    Thanks

    Abhishek


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Friday, January 6, 2017 1:22 PM