question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Continuously degrading performance in repeated one-way calls (S.SM 4.8, netcore3.1)

See original GitHub issue

Describe the bug When calling a one way service with reliable sessions repeatedly, the time to make the call continually increases on the client side.

To Reproduce Steps to reproduce the behavior: https://github.com/ssa3512/wcf-reliable-sessions/tree/perf-repro

  1. Run the wcfasynctestservice project
  2. From wcfasynctestclient directory run dotnet run -f netcoreapp3.1 Observe the call time gradually increase (starts at ~5ms and after a few minutes it is over 500ms)
  3. From wcfasynctestclient directory run dotnet run -f net472 Observe the call time is consistently <10ms over any time frame

Expected behavior Subsequent calls to a service are as performant as the first call

Screenshots image

Additional context I set up an azure function that is calling a legacy one way WCF service on a timer (every three minutes). This is designed to replace a windows service that is calling the service on a timer. I noticed over the span of 24 hours that the function execution time increased from ~10ms to about 2.5 seconds. Stopping and starting the app service immediately reset the execution time back to the expected 10ms.

Some notes from console app repro tests:

  • Using a ClientBase implementation or ChannelFactory does not seem to make a difference
  • Async vs sync does not seem to make a difference
  • Using separate binding/contract/endpoint address objects does not seem to make a difference
  • Reusing the proxy/leaving the channel open seems to alleviate the issue, but that isn’t an option in my scenario as the function execution does not allow reuse of the channel from one execution to the next.
  • Edit: This occurs with both NetTcpBinding and WSHttpBinding

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ssa3512commented, Aug 29, 2021

@ssa3512, when you build at the command line, if you add the -sign parameter, it will delay sign the assembly. So something like this:


build  -build -c Release -sign

Let me know if that works for you.

This has since been rolled out to our production environments and is working very well. We aren’t seeing any of the odd cpu behavior from prior to the update.

1reaction
ssa3512commented, Aug 19, 2021

@mconnew I pulled your branch down and was able to build the nuget packages from it. I will work on integrating them tomorrow and will report back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance issues when you call web services - ASP.NET
Symptoms. When you make calls to web services from an ASP.NET application, you may experience contention, poor performance, and deadlocks.
Read more >
Nsdi13 Proceedings | PDF | Network Switch
Abstract tasks is inexorably intertwined, making the software dif-. Managing a network requires support for multiple con- ficult to write, test, debug, and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found