locked
Sharepoint solution that calls WCF services has performance issues on production machines RRS feed

  • Question

  • I've a SharePoint solution that consists of set of webparts and other features. The webparts backend call a set of WCF web services. When I tried to install it on a production machine, it has some performance issues, I can open the page and wait for 30 min till it response to me.

    If I call the same WCF services from a console application they works fine in both machines, if I creates a SharePoint team site it works fine in both machines, everything works fine on the dev machine.

    The WCF services do some CRUD operations in a database and some API calls to SharePoint and PerformancePoint APIs

    Development machines Specs:

    GPMDEV2@gpmdev.local

    Windows Server 2008 R2 Enterprise, 64-bit
    Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz 2.33 GHz
    3.50 GB RAM
    SharePoint 2010 Enterprise features enabled (assemblies version: 14.0.4763.1000)

    Production machine Specs:

    App-Serv@utc.local
    Windows Server (r) Enterprise, SP2, 64-bit (2008)
    Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz 2.33 GHz
    4.00 GB RAM
    SharePoint 2010 Enterprise features enabled (assemblies version: 14.0.4763.1000)

    These are the application host machines, each one of them connected to another database server.

    I'm sure that there is no problem with the database server performance or communication link.

    The main difference between the two machines is that one of them has the VS 2010 installed, I don't know if this may cause the issue.

    Can the issue cause is the different domain controller for each machine? How can I check that?

    I tried to uninstall and reinstall the SharePoint, putting services under ISAPI and make them a separite web application, What else should I try?

    I think the page takes a lot of time in the request itself, but I'm not sure.

    Please advise, Thank you,

    Hisham Nabil

     

    Thursday, October 7, 2010 2:16 PM

Answers

  • Hisham,

    It makes sense to me that the console app works. It has once less http request in there (SharePoint is one request, and then the request to WCF).

    What url are you using to reference your WCF service?  I would recommend using http://localhost or http://127.0.0.1 (localhost as an ip address).

    If those addresses don't work, can you try moving or using the WCF application on another machine?

    I'm pretty sure the problem is that the WCF app and SharePoint are on the same system. We just need to figure out the cause. I wouldn't worry about the OS patches at this point.

    Let me know,

    Brian


    blog: http://brianhochgurtel.blogspot.com

    MCTS SharePoint 2007 Administration and Development

    Monday, October 11, 2010 1:29 PM

All replies

  • Hisham,

    I don't know what's wrong, but I have some ideas that might help you troubleshoot.

    Are the WCF services on the same machine as SharePoint? 

    If Not:  Is there some sort of firewall,dmz or proxy server between your SP server and your services?  Or perhaps even a router problem. You may want to do a traceroute from your sharepoint server to your WCF Server. I could see a router loopback problem causing this issue.

    If So:  Is there a way you can run some of those SQL statements in the WCF methods on the SP machine so you can see the response time. It may be some sort of connection issue with SQL server--though I bet your content database is there.

    Also look closely at IIS settings for both Sharepoint and the WCF application. Look for changes between test and prod.

    Let me know what you find,

    Brian

    blog: http://brianhochgurtel.blogspot.com

     

     


    blog: http://brianhochgurtel.blogspot.com MCTS SharePoint 2007 Administration and Development
    Thursday, October 7, 2010 8:09 PM
  • Thanks Brian,

    The WCF services on the same machine as SharePoint under the ISAPI folder. I already coded a console application that calls these services continously and log the response time, they works fine (faster than the dev machine!!!)

    I tried them under the ISAPI folder, then I deployed each of them in a separate web application, in all cases they works fine when I call them from a console application and give me a performance issue when I call them from sharepoint.

    I'm trying now to carfully compare IIS settings in both machines (Do you think the OS 2008 SP2 vs 2008 R2 is the issue cause?)

    I also tryed Fidler on both machines..

    On the test machine it sometimes gives this error (I don't know why):

    The message could not be processed. This is most likely because the action 'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

     

    Sunday, October 10, 2010 4:09 PM
  • Hisham,

    It makes sense to me that the console app works. It has once less http request in there (SharePoint is one request, and then the request to WCF).

    What url are you using to reference your WCF service?  I would recommend using http://localhost or http://127.0.0.1 (localhost as an ip address).

    If those addresses don't work, can you try moving or using the WCF application on another machine?

    I'm pretty sure the problem is that the WCF app and SharePoint are on the same system. We just need to figure out the cause. I wouldn't worry about the OS patches at this point.

    Let me know,

    Brian


    blog: http://brianhochgurtel.blogspot.com

    MCTS SharePoint 2007 Administration and Development

    Monday, October 11, 2010 1:29 PM