You can try the following things to analyze your problem.
1. Disable the timer when you enter the Timer.Elapsed event method.
This will prevent an event to be fired during the execution of the event method.
2. Add a Stopwatch in order to see how long time you spend in there.
void timerToMonitorExcel_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Stopwatch sw = new Stopwatch();
sw.Start();
try
{
timerToMonitorExcel.Enabled = false;
GetJigStatus();
}
catch (Exception ex)
{
log.Error("Issue on Excel Data ", ex);
}
finally
{
Debug.WriteLine(sw.ElapsedMilliseconds);
timerToMonitorExcel.Enabled = true;
}
}
This will give you two things:
1. A confirmation of if the problem is events fired too fast for your code.
2. The time you spend in the method.
If the time you spend is longer than 1 sec, and you cannot make the interval longer, you have to make your code more efficient.