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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:37:55+00:00 2026-06-06T16:37:55+00:00

I have a windows service that does some intensive work every one minute (actually

  • 0

I have a windows service that does some intensive work every one minute (actually it is starting a new thread each time in which it syncs to different systems over http). The problem is, that after a few days it suddenly stops without no error message.

I have NLog in place and I have registered for AppDomain.CurrentDomain.UnhandledException. The last entry in the textfile-log is just a normal entry without any problems. Looking in the EventLog, I also can’t find any message in the application log, however, there are two entries in the system log.

One basically says that the service has been terminated unexpectedly. Nothing more. The second event (at the same time as the first one) says: "…A new guard page for the stack cannot be created…"

From what I’ve read, this is probably a stack overflow exception. I’m not parsing any XML and I don’t do recursive work. I host a webserver using Gate, Nancy and SignalR and have RavenDB running in embedded mode. Every minute a new task is started using the Taskfactory from .NET 4.0 and I also have a ContinueWith where I re-start a System.Timers.Timer to fire again in one minute.

How can I start investigating this issue? What could be possible reasons for such an error?

  • 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-06T16:37:56+00:00Added an answer on June 6, 2026 at 4:37 pm

    Based on the information that you provided, I would at least, at the minimum, do the following:

    1. Pay extra attention to any third party calls, and add additional info logging around those points.
    2. There are some circumstances in which AppDomain.CurrentDomain.UnhandledException won’t help you – a StackOverflowException being one of them. I believe the CLR will simply just give you a string in this case instead of a stack trace.
    3. Pay extra attention around areas where more than one thread is introduced.

    An example of an often overlooked StackOverflowException is:

    private string myString;
    public string MyString { get { return MyString; } }  //should be myString
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows service that generates logs as it does some execution. I
I have a Windows service that I'd like to gather some debugging data on
I have a windows service that has a lot of work to do simultaneously.
I have a windows service that fails to start under some circumstances. When it
I have a Windows Forms application that I wrote that does some monitoring of
We have a Windows Service written in C#. The service spawns a thread that
I've got a windows service that regulary (every 10 sec) does a lot of
I have a windows service that is heavily multithreaded. Each thread calls various methods
I have a Windows service that runs as a logged-in user (local admin). During
I have a Windows Service that takes the name of a bunch of files

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.