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

  • SEARCH
  • Home
  • 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 7844525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:54:25+00:00 2026-06-02T16:54:25+00:00

I have created my c# console application as windows service and installed the service

  • 0

I have created my c# console application as windows service and installed the service in remote server which is 32 bit machine and has 2GB RAM.
To this server application many clients are connected and gets the data from server.
The problem is sometimes the server machine is down and unable to access the data, that time we need to restart the server every time.I have not able to identify where exactly the problem is.
When i was checking the evenlogs in server machine i found the below exception,

source .net 2.0 runtime error.

EventType clr20r3, P1 myapplication.exe, P2 1.3.2.1, P3 4cb724a3, P4 mscorlib, P5 2.0.0.0, P6 4be90358, P7 1947, P8 7, P9 system.outofmemoryexception, P10 NIL.

I have googled a lot, but unable to find exact reason.
I am using HTTPSERVER.MVC (opensource) for url communication.
To create service below code is added in the main function.

 ServiceBase[] ServicesToRun;
 ServicesToRun = new ServiceBase[] 
 { 
   new TouchService() 
  };
 ServiceBase.Run(ServicesToRun);

Please some one help me out.
Thanks in advance

  • 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-06-02T16:54:28+00:00Added an answer on June 2, 2026 at 4:54 pm

    The reason is – you are out of memory.

    In .Net this doesn’t necessarily mean that there is physically no more memory, it just means that the CLR was unable to find enough contiguous memory to allocate something. This can be due to huge amounts of memory already being allocated, or due to memory fragmentation.

    Without knowing more about your application it is difficult to give more than general advice, but a few pointers are:

    • try monitoring the size of the heaps using the Windows performance counters and tools such as Process Monitor
    • look at your code – are you holding on to references indefinitely and growing the overall size of memory being used without end?
    • are you allocating any large single blocks of memory above about 80KB, for example large strings of data? Large objects like this are allocated on the Large Object Heap and not compacted which can lead to fragmentation and OutOfMemoryExceptions?
    • Have you tried using a memory profiler? (I tend to use SciTech’s .Net Memory Profiler, but there are other good ones). This lets you start your service and attach the profiler, do some work, take a snapshot, do some more work, and then look at the differences between the snapshots. This is a very powerful way of spotting if and why memory usage is creeping up.
    • Are you doing lots of XML serialization? Apart from the propensity to generate large strings (see previous point), using certain overloads on the XmlSerializer constructor can also cause new xml serialization dlls to get generated and loaded into the application pool every time they are used.

    These are just some random thoughts, but I would suggest getting a basic understanding of CLR memory management and garbage collection if you don’t already, try some monitoring and profiling, and take a critical look at your code.

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

Sidebar

Related Questions

I have a simple .NET application which runs as Windows Service. Say it has
I've a windows workflow service that is hosted in a console application. I have
I have created just a simple web service as a console application. It works
I have created a console application which run selenium test and open up browser,
I have a console application from which I create a window. I can render
I have created a console application that calls a method on a webservice. I
I have created a small chatting application in C#, and started as a Console
I have created a service which displays a status bar notification after certain time
I need to write a windows service which executes an application after a certain
I have an windows service that monitors a folder for new files being created.when

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.