locked
Sync failing when load testing RRS feed

  • Question

  • This may be a more WCF/IIS issue but I would appreciate anyones help thanks.

     

    We have a Sync which works using WCF/IIS so we can sync our clients over the internet.  The server is SQL 2008 R2 and the clients are SQL 2008 Express.

    We can sync up to 20 clients fine and the full sync takes about 10-15 minutes.  When we ramp up the number of clients though the sync takes up to an hour.  Occasionally the sync fails and all the clients are disconnected.  We have error trapping built into the clients so they try again after 15 mins but wonder why the sync is failing.  The SQL Server CPU is at 95% - 100% during most of the sync.

    I've tried remote debugging the server and nothing comes back - which makes me think that IIS is closing the threads in the application pool for some reason.  I haven't done much with IIS before so am not sure what to check for.  Presumably threads are killed/recycled after a period of inactivity.  I think that the sync is waiting for data from SQL and the IIS thinks that they have failed.

    This message appears in the Event Log periodically:

    ISAPI 'C:\Windows\Microsoft.net\Framework\v.1.1.4322\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'.

    Has anyone had similar issues?


    Sunday, June 19, 2011 3:19 PM

Answers

  • Thanks JuneT,

    I narrowed it down to the ASP.NET throttling settings in the machine.config - they are set way too low for WCF by default.  These are the values I used (and replaced autoconfig = true):

    <processModel maxWorkerThreads="500" maxIoThreads="500" minWorkerThreads="2"/>

    <httpRuntime minFreeThreads="250" minLocalRequestFreeThreads="250" executionTimeout="900"/>

     

    The server is no longer killing the threads now.

     

    This is a good page to explain further:

    http://blogs.msdn.com/b/wenlong/archive/2008/04/21/wcf-request-throttling-and-server-scalability.aspx

    • Marked as answer by Harjit Samra Tuesday, June 21, 2011 3:11 PM
    Tuesday, June 21, 2011 3:11 PM

All replies