Large Delays noted in the WCF logging RRS feed

  • Question

  • We have a system written using WCF where we have a customer complaining of occasional large delays in the web application, however, for the vast majority of the time the web application response is normal.

    These delays last for several minutes and then seem to resolve themselves.  Whilst investigating this issue I have looked at the wcf logs generated and found that we have some messages being processed that have unusually large durations.  These seem to be being caused by securing the outgoing message and all the message involved required impersonation at the service end.

    I have included a screenshot of one such message. In the particular case the duration was 2hrs .  There are many more varying in time from several minutes to several hors.

    Does anyone have any comments on this and can give me an idea why this might be occurring and what to look at from here?

    Monday, July 15, 2019 10:58 AM

All replies

  • Hi,

    <quote> These seem to be being caused by securing the outgoing message and all the message involved required impersonation at the service end.</quote>
    If the delay is caused by the WCF message process, we could set up the binding configuration of the server to exclude this issue. For example, we can configure the Security Mode of the binding type lest additional security consumption.

                <security mode="None"></security>

    Besides, if we use the ORM to CRUD database in WCF service, there might be some other consumption in the Database system. Dealing with large file stream, or using multiple clients (required that server allot connection resources), it will inevitably consume a lot of memory and CPU resources of the server. From this point of view, the performance of the service is also related to the performance of the machine.
    Best Regards

    Tuesday, July 16, 2019 2:56 AM
  • OK thanks for the input. This kind of confirms my thoughts (particularly as now we have also seen some authentication issues to the database as well) although I don't really understand some of the massive delays (hours?).  I suspect some environmental issues. I have thought about turning off the security mode but I am not sure if we will be allowed to do that.
    Tuesday, July 16, 2019 7:07 AM
  • Performance tuning is tricky as it can take a lot of effort to determine the bottlenecks. Regarding WCF and the WsHttpBinding, there are a two settings that can have a negative impact on performance.



    the following blog goes over this.

    However, it doesn't necessarily mean your issues are related to WCF. Could be bottle necks on the database and / or in the code making calls to the database.

    william xifaras

    Thursday, July 18, 2019 6:22 PM