2008 R2 Terminal Servers and Printers……

So, at the 8-5, I am in charge of the architecture of our GE Centricity Hosted Platform. Part of that is maintaining and enhancing the Terminal Servers that clients log into.

Over the last few weeks, we had been presented with an issue where users would log in to the system, go to log into the EMR portion of CPS and would find that it took upwards of 100 seconds to bring the Chart application up. Wait, 100 seconds ?!

No application should EVER be that long to load up, but here is the catch, the EMR portion loads up the printers for the users at the time of launch. The idea of loading up printers when you start an application SEEMS like a good idea, but it’s not, and this is why. When you load up all of the printers, if you print spooler or printer is having issues loading it causes a chain reaction.. Great right?

So this circles us back to the complaints of 100+ second logins. After digging through the servers I found that our friend, Mr. Print Spooler, was over 300 MB.. Immediately restarting the spooler, it would climb to about 75MB and sit there till people would start logging in and doing printer related functions. To test my theory I would jump around servers looking for the various sizes that the spooler had gotten to and found that in our solution (we deploy Dell R410 and Dell R420’s with 32GB of RAM), if the spooler got above 200MB, degradation in spooling is seen, which results in the performance of printers going down.

To remedy this I created a VBscript that would check the current spooler size (very, VERY roughly), if it was above the 185MB mark the script would reboot it. This action was extremely reliable, and in the 3 days I had it in production, it seemed to hold the servers steady.

Since we deploy both RDP and citrix servers, and I had confirmed Citrix had similar issues, so I tried putting Citrix spooler restart commands within the script.. Note; They don’t work.. something about the way the spooler for Citrix works… at least my script could never get it to work so we disabled it for our Citrix Servers.

Another issue that I found with this script, is that if you have users with locally attached printers, they will be put offline and will NOT come back until the user restarts.

I set this to run every 5 minutes, and it seemed to work well (you know.. less the missing local printers..), we didn’t get ANY complaints about the EMR application loading up, so it was a win in my book.

With all of that said, if you don’t have locally attached printers but do have issues with the print spooler getting to high, I hope this helps you.