title: Windows Service is started but does not do anything - .NET
body: <p>I have a .NET Windows Service (.NET 3.5) with a timer (<code>System.Timers.Timer</code>). The <code>OnElapsed</code> method looks like this:</p>
  
  <pre><code>    private void OnTimerElapsed(object source, ElapsedEventArgs e)
      {
          lock (this)
          {
              timer.Stop();
              //process some stuff here..
              ProcessStuff();
              timer.Interval = GetTimerInterval();
              timer.Start();
          }
      }
  </code></pre>
  
  <p>It works fine until it mysteriously stops working. This happens every x days and although the service has a status of started, it does not kick off the <code>ProcessStuff</code>() method. I use <code>log4net</code> and nothing is logged there or in the Windows Event logs. The <code>ProcessStuff</code>() spawns multiple threads to do some work.</p>
  
  <p>How do I resolve this?</p>