The Core Technologies Blog |
Professional Software for Windows Services / 24×7 Operation
Posted on March 17, 2025  We are a licensed customer of AlwaysUp and its a great help to our services. However one of the things I want to be able to do is “group” services into a logical set. That way you can see which services belong together visually in AlwaysUp, and more importantly you can start or stop all services in a group either through user interaction or through the AlwaysUp CLT. Also, when defining services through the CLT or XML, we’d like to set the group to fit into. Do you think this is something that can be accommodated in a future release or something that may be even there right now and I can use? It will be useful for our product because it has a number of different services that need to start up together and shutdown together seamlessly. Let me know. Thanks. — Mac B Hi Mac. Great question! It’s easy to see how being able to group your applications and operate on them as a unit is a very powerful capability. The good news is that AlwaysUp already supports application grouping. It’s implemented through the use of tags, which work in the user interface and behind the scenes in the APIs as well.
What’s a tag in AlwaysUp?A tag is simply a word or phrase that you assign to an AlwaysUp application. It can be anything you like. The only restriction is that spaces and semi-colons are not allowed. For instance: group1 is OK group-1 is OK (dashes are recommended for readability) group_1 is OK (underscores work great too) group 1 is NOT OK (spaces aren’t allowed) Group1 is OK (same as group1 because case is ignored) onelongnamethatsnotveryreadable is OK (but long names are discouraged because they’re difficult to work with visually) trading-apps is OK trading;apps is NOT OK (semi-colons aren’t allowed because they’re used to separate multiple tags)
Hopefully you get the idea! How do I use tags to create groups?You create groups of applications by assigning tags. For example, let’s say you’re running four Java applications as Windows Services with AlwaysUp — two for production and two pre-release versions for testing. In that case, tagging the production applications with “production” and the others with “testing” creates two groups, where: Here’s what that arrangement looks like in AlwaysUp. Notice the Tags column, which shows the values associated with each application: To show only the production applications, you would: Choose View > Filter Pane to show the filter controls In the Show only applications with tag dropdown, choose production.
The testing applications will fall away to leave the two production entries by themselves: From there, it’s easy to work with the production applications as a set. For example, you can select them all and restart them together. Similarly, you can select the testing tag to show only the beta applications: This way, it’s easy to handle them as a group — instead of dealing with them mixed in with the production applications.
How to tag an application in AlwaysUpThere are a couple of ways to tag an application in AlwaysUp. Method #1: Add tags from the Application menu entryAfter selecting the services you want to update, choose Application > Tags > Add from the menu: In the Add Tags window, type in the tags you want to add. For example, we’re adding the “v2” tag to our production instances here: You can add as many tags as you like there. Click Next and complete the process. Afterwards, the new tags will show up on your applications, as they did for us: That’s the best way to update multiple applications at once. Method #2: Add tags by editing your applicationIf you prefer to update each application individually, you can do so by editing the application. You’ll find the Tags field at the bottom of the General tab, where you can add whatever tags you like: You can edit the field to remove tags there as well.
Tags create groups in AlwaysUp Web Service and AlwaysUp CLT tooIndeed, tags and groups show up throughout the AlwaysUp family of products. For example, AlwaysUp Web Service prominently displays the tags associated with your applications: (A future version will enable filtering by one or more values.) Furthermore, to manipulate groups of AlwaysUp applications from third-party applications, developers can employ the AlwaysUp Web Service API. Several of the API methods — including the popular “Get Application Status” function — accept one or more tags as input, as described in the documentation: Since you’re working from the command line with AlwaysUp CLT, you can add tags to your applications using the -tg parameter. That capability is described on page 9 of the user manual. But if you prefer to work with XML, you can specify tags when installing your applications that way instead: Whatever works best for you!
Posted on March 2, 2025 Hi everyone. This week, our team decided to give our free ServiceCommander utility some love. Here’s a quick roundup of the improvements.
ServiceCommander displays larger icons on the taskbar menuPrevious versions of ServiceCommander displayed 16×16 icons in the tray menu. That made for a very compact display — ideal to fit many Windows Services on-screen. But the feedback from folks using the software was that the menu was too small. Apparently most users manage only two to five services and a more spacious user interface would make ServiceCommander easier to use. Taking that feedback on board, we switched the icon size to 32×32. You can see what the new, roomier taskbar menu looks like in this screenshot: But you can switch back to small icons if you likeThe new interface should be better for most users but what if you’re working with lots of services? The reality is that your screen may not be able to fit the longer taskbar menu if it contains more than twenty entries. For users who want to pack in the pixels — and those who don’t need glasses just yet — we added a new option to use small icons on the menu. To switch to the more compact menu display: Click the ServiceCommander icon to open the menu. Select Configure. In the Configure ServiceCommander window, switch to the Options tab. Check the Show small icons on the taskbar menu box: Click the Done button to save your change.
ServiceCommander shows more services in the taskbar menuWhen managing many services, the taskbar menu would only show up to 30 services. Any more than 30 would “overflow” into a “More Services” menu, which required an extra click to access. ServiceCommander 7 removes that hard cap of 30 services and computes the limit based on the resolution of your screen. The end result is that you’ll see as many menu entries as your screen will hold. For example, on our 2560×1440 display, we can fit 29 services without overflowing. However, if we switch to small icons, the more compact menu will accommodate up to 50 services:
ServiceCommander 7 is fully compatible with Windows Server 2025This new release works flawlessly on Windows Server 2025. Fortunately we didn’t even have to change much code to support the new operating system — just a few behind-the-scenes routines. Enjoy!
Posted on February 17, 2025 (Revised March 15, 2025) As AlwaysUp enters its 21st year of babysitting important applications — and reducing interruptions during dinner time — we’re pleased to release version 16 to all customers. Version 16 is a significant step forward. Most notably, the powerful sanity check feature has been overhauled to prioritize ease of use while retaining flexibility. And beyond that, a handful of fixes and improvements make life easier for anyone looking to run an application as a Windows Service. Dig into the details below.
AlwaysUp continuously monitors your application and quickly restarts it if it stops workingWith regards to failure detection, AlwaysUp has always gone beyond the basics. Most notably, the powerful sanity check feature — which has been included since version 3 — allows you plug in your own executable and check for any kind of failure you like, not just crashes and hangs. But plugging in a sanity check could be difficult. The truth is that not everyone has the time or expertise to write code or compose a batch file. And the somewhat predictable consequence, is that the sanity check feature was limited to the technically savvy. AlwaysUp 16 changes all that. Now, anyone can introduce a sophisticated sanity check — in seconds. For example, let’s say that the application you’ve installed as a Windows Service with AlwaysUp runs a HTTP/S web server. That’s a very common practice these days, as enterprise programs like Prometheus and ngrok illustrate. You’ll probably want to make sure that the web server component doesn’t fail because if it does, you’d have to jump onto the server and restart the software. Here’s how you would set up a sanity check to guard against that: Edit your application in AlwaysUp. Check the Whenever it fails a periodic sanity check box and click the Set button on the right: In the Add Sanity Check window, choose Check that a web server is responding properly from the list and click Next: On this page, enter the URL of the page that AlwaysUp should check. That address will probably be rooted at localhost (or 127.0.0.1) since you’re checking a local application: After clicking Next, specify how often AlwaysUp should ping your web server: Finally, confirm your settings and click the Add button to save your new sanity check:
And with that sanity check in place, AlwaysUp will visit the URL every 5 minutes. If the URL doesn’t load — or returns an invalid response — AlwaysUp will promptly restart your application. Check out the AlwaysUp sanity checks page for the full complement of built-in sanity checks available today.
No more errors when your script completes very quicklyMost customers rely on AlwaysUp to manage their long-running applications. In fact, keeping an executable running 24/7 is the norm. AlwaysUp launches those applications at boot and they never stop running until the machine shuts down (or something goes wrong). But there’s another use case that has grown in popularity over the years. Instead of starting an application and expecting it to run for a long time, some customers use AlwaysUp to run a script over and over again. And in that scenario, the script may only run for a few seconds. For instance, one customer uses AlwaysUp start a Python script that scans a folder and imports its files into a database. Once the script completes, they have AlwaysUp launch it again in fifteen minutes. If there are lots of files, the script may run for 30-40 seconds. On the other hand, if there are no files, the script returns almost immediately because there is no work to do. Unfortunately, that “quick exit” would occasionally confuse AlwaysUp. Did the script do its work and complete normally? Or was there a problem that caused it to abort? More pointedly, should AlwaysUp treat the speedy exit as success or failure? Instead of trying to determine the answer programmatically — which has proven to be quite challenging — we decided to put you in the driver’s seat. After all, you understand your script much better than we do!  So if you’re running a program or script that can run and finish quickly — in less than five seconds — please enable this new option on the Restart tab: Once that’s in place, AlwaysUp won’t assault you with phantom errors when your application does its work and exits very quickly.
Other fixes & improvementsWhen setting up automatic logon to avoid Session 0, your auto-start applications will now be launched in the new session by default. That’s what most customers want. As a result, this option in the Autologon window will be checked by default: Note that you can find the Autologon window by selecting Autologon from the Tools menu in AlwaysUp. Improved efficiency when processing records from the Windows Event Logs. The new code makes a difference when AlwaysUp has to sift through tens of thousands of records in the System or Application logs. When running a custom sanity check program/script, AlwaysUp will now treat a failure to launch the program as an inconclusive result. The application won’t be restarted, as it would have been in previous versions. We made this change to avoid spurious restarts, because those failures were likely unrelated to the application being monitored. Full support for the official release of Windows Server 2025 (build number 26100.2605). Recent releases of AlwaysUp are also compatible with Server 2025, but version 16 is the best so far. 
As usual, please review the release notes for the full list of features, fixes and improvements included in AlwaysUp version 16.
Upgrading to AlwaysUp 16If you bought AlwaysUp version 15 (after December 2023), you can upgrade to version 16 for free. Simply download and install “over the top” to preserve your existing applications and all settings. Your registration code will continue to work as well. If you bought AlwaysUp version 14 or earlier (before December 2023), you’ll have to purchase a discounted upgrade to use version 16. Please purchase upgrades here — you’ll save 50% off the regular price. See the complete upgrade policy for additional details. Thank you for reading!
Posted on January 18, 2025
Why should Service Protector restart a service that’s stuck starting or stopping?When a Windows Service is in the “Starting” or “Stopping” status, it’s probably not be doing its work. For all intents and purposes, your service may be down during those periods. Usually that’s not a problem though, because services typically move through those transitory states very quickly. In our experience, a service isn’t in the starting or stopping state for longer than a couple of seconds — while it opens network connections, connects to a database, shuts down cleanly or performs another important one-time task. But there are unfortunate occasions where a service takes too long to start or stop. And in those situations, the only cure is to forcibly terminate and restart the service. As part of its mission to keep your Windows Service running 24/7, Service Protector has code to automatically detect and terminate a stuck service. We recommend activating that feature if you’re managing a service that has trouble moving in or out of the running state quickly.
How do I activate the feature in Service Protector?When adding (or editing) your service, you can instruct Service Protector to deal with the stuck states on the Extras tab: With the settings in the screenshot above, Service Protector will terminate and restart your service if it lingers in the “Starting” or “Stopping” state for longer than a minute. In our experience, 60 seconds is about right for most services. Under normal situations, it’s rare for a Windows Service to take much more time as it starts or stops.
What are your best tips for handling stuck services?Tip #1: Adjust the timeouts for your serviceWhile the default timeout of 60 seconds will suit most customers’ needs, every Windows Service is unique. As such, you should definitely tune the timeouts for your specific situation. For instance, if your service takes a while to initialize — perhaps because it has to negotiate complex operations in a distributed environment — you should increase the starting timeout to compensate. Tip #2: Setup email alerts to identify “flapping”With this feature in place, Service Protector will automatically restart your service whenever it gets stuck for too long. Usually that timely restart is enough to get things moving again. But sometimes restarting isn’t the answer. We’ve seen situations where the service simply got stuck again and repeatedly restarting did no good. Manual intervention was required. We recommend setting up email alerts to help you detect edge-case situations like that. That way, if you see Service Protector continuously restarting your stuck service, you can jump in to save the day.
Posted on December 23, 2024 To cap a very busy 2024, our team released Service Protector 10.5 on December 20. Happy holidays to you and yours! Here’s what’s new in this release. Automatically restart your Windows Service if a “bad” event is loggedOne of the most unique features built into Service Protector is the ability to restart your service whenever something important goes wrong. In fact, you can install a sanity check, to constantly interrogate your service and quickly detect when things go off the rails. Version 10.5 introduces a powerful new sanity check. With our latest addition, you can automatically recycle your Windows Service whenever one or more critical Windows events are reported. The new sanity check is most helpful when external/system changes can impact your important Windows Services. For example, you can instruct Service Protector to restart your service if any of the following security events occur: You may want to check out the hundreds of Windows security events to see if any should trigger your service to restart. How to watch out for critical eventsThe new sanity check is very easy to set up. Here’s the process, step by step: Edit your service in Service Protector. Switch to the Monitor tab. Check the Whenever it fails a periodic sanity check box and click the Set button: In the Add Sanity Check window that comes up, choose the Check for one or more adverse Windows events entry from the list: Click Next to move on. We’ve arrived at the main configuration page for the sanity check. Choose the Windows Event Log to monitor and enter one or more events to watch out for. In this screenshot, we’ve targeted a couple of events in the Security log: Click Next to move on. On the following screen, specify how often to check the event log. Every 5 minutes works for our situation: Click Next to go to the next page, confirm your settings and complete the process.
Sorting!If you’ve installed many services, you can now sort the list of protectors from the header. Any of the three columns — Service, Service State or Protection — can be designated. Simply click the column header to sort your services or to change the direction of the sort. The caret (∧ or ∨) will show you which column is sorted. For example, the Protection column is sorted ascending (A-Z) in this screenshot: Clicking the Protection header again will reverse the sort, to order rows descending (Z-A): Note that the sort order is “sticky”, meaning that it’s remembered across runs of Service Protector. Other fixes & improvementsFull support for the official release of Windows Server 2025 (build number 26100.2605). Older builds of Service Protector are also compatible with Server 2025, but this one’s the best so far.  To help troubleshoot your sanity checks, the full transcript is written to the Windows Event Log whenever a sanity check fails. That report will highlight exactly what went wrong. For example, you may see a message like this reported when the check website sanity check fails: Happy debugging!
As usual, please review the release notes for the full list of features, fixes and improvements included in Service Protector version 10.5. Upgrading to Service Protector 10.5If you purchased Service Protector version 9 (after April 2023), you can upgrade to version 10 for free. Simply download and install over your existing installation to preserve your existing services and all settings. That way, your registration code will continue to work. If you bought Service Protector 8 or earlier (before April 2023), you will need to upgrade to use version 10. Please buy upgrades here — at a 50% discount. See the complete upgrade policy for more details. Enjoy! | |