Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7563469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:40:27+00:00 2026-05-30T13:40:27+00:00

Hi have quite a problem with an Service running WCF in duplex-mode. It leaks

  • 0

Hi have quite a problem with an Service running WCF in duplex-mode.
It leaks memory (not much but it’s about 80MB a day) and after having a memory-profiler running alongside the service for 24 hours I found most of the memory sitting in byte[] referenced by quite a mess but I most references end in something like this:
one path holding the byte[] - array
and the “root” looks like this:
root

I too see lots of ServiceChannel (around 200) comming (I think) from the callback-channels.

I’m rather sure that I only hold 1 of those for each of the connected clients.

Overall my problem seems to be almost the same as this: memory leak in silverlight Wcf implementation but on the server-side.

I even tried the [MTAThread] thing mentioned here: WCF service leaks handles and memory when a client times out but it just don’t solve the problem.

I just don’t think that the problem is with my code as I wrap the callback-channels after getting it with OperationContext.Current.GetCallbackChannel<IServiceConnectorCallback>() in one of my own objects and those don’t leak (there is only one of those for each clients in memory at any given snapshot) – sure I reset those callbacks on several occasions as the channel might change (clients losing the connection or reconnecting) but I don’t have a way of disposing the old references so I only drop them and the GC should do it’s job on them.

I do use PerCall on my service so I don’t have any handle to those objects in my code at all.

I really have no clue at how I can handle this aside from restarting the service every few days – a solution I don’t want to probose right now 🙁

So please give me some help/hints on this – thank you very much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:40:29+00:00Added an answer on May 30, 2026 at 1:40 pm

    When a session based channel faults a call to Close will throw an exception. However, there are proxy side resources that are not cleaned up in this case and these are only cleaned up when you Abort the faulted channel

    Make sure that when you replace a faulted channel that you Abort the old one first

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this quite popular problem, but have failed to find a solution that
I have a problem that is quite simple to understand, but for me it
I have a quite simple WCF service method which returns an IQueryable, just for
I have a WCF running as a Windows service. I deployed it to a
I have quite a problem concerning the use of relational database concepts in Delphi
I have quite a strange problem with PHP and Apache on my local testing
I have a quite specific problem. I created a webapp and want to have
I have come across quite a wired problem right now. I am using ASP.NET
My problem is quite simple: I have a 400MB file filled with 10,000,000 lines
So I have been Googling and I am quite sure my problem emerge from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.