The application itself works fine. New files are discovered quickly and we have a system that works reliably 24/7.
The only problem is that we’re seeing hundreds of errors in the activity report:
Have you ever had this reported before? Can you recommend some ways to help us avoid the errors?
Hi Clayton. Thanks for supporting our software!
By default, AlwaysUp’s mission is to run your application 24/7 — with no interruptions.
However, your program runs periodically. That’s perfectly fine, but you should make a couple of tweaks to have AlwaysUp tolerate the frequent stops and starts.
Tweak #1: Minimize the logging around expected starts & stops
First, understand that AlwaysUp is a chatty babysitter. 🙂
Whenever the application it’s watching starts or stops, AlwaysUp writes an informative entry to the Windows Event Log.
For example, you will see one of these messages when AlwaysUp starts (or restarts) your C# program:
The application has been started
The application has been restarted (run #number)
And AlwaysUp writes similar entries when the application crashes or stops for any reason.
For customers running applications continuously — like Dropbox, OneDrive or VirtualBox — those messages are helpful. They highlight the rare occasions where the application runs into trouble and needs attention.
But your scenario is different. AlwaysUp launches your application every 30 seconds. As a result, AlwaysUp will inundate your activity log with useless messages.
Fortunately, our team has already designed an easy way to eliminate the spurious log entries. Please:
Edit your application in AlwaysUp
Move to the Restart tab
Check the Minimize event logging as the application starts & stops box:
Save your changes.
That adjustment will prevent AlwaysUp from filling up your event logs. Restart your C# application and you will notice that the activity report is much less verbose.
Tweak #2: Make AlwaysUp tolerate “quick exits”
From the detailed logs you sent, each of the three runs completed in less than 1 second. That’s very fast, and the quick turnaround confuses AlwaysUp.
In fact, because your C# application does its work and exits so quickly, AlwaysUp thinks that your application failed to start at all!
And with that conclusion, AlwaysUp immediately runs your program again.
The result is the cycle you see in your logs — the repeated, rapid fire running of your console application.
The solution to the problem is to tell AlwaysUp to not to panic if your application completes quickly. To do so:
Create an empty file called alwaysup-dont-panic-on-quick-exit.txt in your AlwaysUp installation directory (likely C:\Program Files (x86)\AlwaysUp):
Restart your application in AlwaysUp.
The presence of that “magic” file signals AlwaysUp to tolerate your application’s speedy exit and avoids the unnecessary restarts.
Best of luck with your C# console application!