One of my Windows 2003 servers began exhibiting very strange behavior a few months ago.  That a Windows server behaves badly isn’t strange, of course, but I’d never before encountered precisely this problem.  I searched and searched for solutions on Google, but could not find one that worked for me (though I did discover that a handful of others reported having very similar issues).  Since I’ve gotten so much help from the web (via Google) before, I figured I would pay back my debt by posting the solution I found this afternoon.  Your kilometerage may vary.


Services which log on as LocalService*, as opposed to LocalSystem and NetworkService, die repeatedly and at regular intervals.  In my case, it was every 90 seconds give or take 5.  I believe Windows 2003 and XP use the LocalService and NetworkService accounts for running services, so this may not apply to Windows 2000 or other versions of Windows. * Some of these services are Windows Time, TCP/IP NetBIOS Helper, Remote Registry, Application Layer Gateway Service, Alerter, Smart Card, SSDP Discovery Service, Universal PnP Device Host, WebClient, and Windows User Mode Driver Framework. 


Disable WINEXIT.SCR screensaver within any relevant user accounts, e.g., Default User, All Users, or any service account.  You can run a search in regedit for the string "winexit.scr" to turn up all such values and determine which are relevant.  The value I needed to delete was in HKEY_USERS/.DEFAULT/Control Panel/Desktop/SCRNSAVE.EXE.


The server in question is to be used for public terminal services, so I intended to use the winexit.scr screensaver as a relatively lightweight, easy way to ensure that users get warned about idle time and subsequently logged off after a preset period of time.  There are other ways of accomplishing this, to be sure, but I've always had good experiences with winexit.scr.  At any rate, while watching the list of processes in Task Manager, I noticed that about every minute-and-a-half, a winexit.scr process popped up and, more interestingly, was running in the LocalService context.  Lightbulb! Services running under LocalService are all launched via the svchost.exe binary that is included with Windows, and it turns out that the winexit screensaver kept shutting down these services (as I unwittingly instructed it to do) when they took advantage of their ability to log on as a service.  Why every 90 seconds?  I had winexit configured to allow only 60 seconds of idle time, and it gives the user 30 seconds of warning before killing a session. 

It’s almost as though computers are logical.  I just love when problems make sense.