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 688675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:15:15+00:00 2026-05-14T02:15:15+00:00

I was profiling my .net windows service. I was trying to discover OutOfMemoryException and

  • 0

I was profiling my .net windows service.
I was trying to discover OutOfMemoryException and discovered that my stack size
is huge and is growing because the the number of threads keeps growing.

Each thread gets 1024 KB on Windows x64 machine. Thus when my app has 754 threads the stack size would be 772 MB. The problem for me is that i don’t know where these thread come from. Initially my app has a very limited number of threads and they keep growing with time.

I have two suspicions – either these threads are created by WCF or by database connection.
My application uses both WCF and datasets. Also I tried to profile my app in Ants do Trace i can see large number of System.ServiceModel.Channels.ClientReliableDuplexSessionChannel
and this number is increasing with time. I can see thousands of these objects created. So what I want to know is who is creating threads (tools to discover, profilers) and if it is WCF who is creating these threads.

UPDATE

I have stopped in debugger my app to look at the threads. All I can see a large number of Win32 threads with call stack like that

ntdll.dll!7c82860c()    
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
ntdll.dll!7c827d99()    
kernel32.dll!77e4e02f()     
mscorwks.dll!79e7c7a8()     
mscorwks.dll!79f943fe()     
mscorwks.dll!79f94237()     
mscorlib.ni.dll!792f5577()  
mscorlib.ni.dll!792e01c5()  
  • 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-14T02:15:15+00:00Added an answer on May 14, 2026 at 2:15 am

    You could look at the program using a debugger – then you can see what all those threads are doing (most of them probably have a very similar call stack).

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

Sidebar

Related Questions

Through profiling I've discovered that the sprintf here takes a long time. Is there
Is there any .NET performance profiling tool out there that I can attach to
Background I have a Windows service that uses various third-party DLLs to perform work
Usually I would look at writing a Windows Service to manage tasks that aren't
I need to do some memory profiling of a .NET Framework application. Should I
while profiling a java application that calculates hierarchical clustering of thousands of elements I
I recently began profiling an osgi java application that I am writing using VisualVM.
I am trying to implement a reoccurring timer function asp.net. I am not able
I need a solution where I have a single windows service providing access to
I've got a local app, consisting of a windows service providing the middle/business tier

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.