Learn More Download Free Trial Pricing & Buy

Archive for the ‘printing terminal services’ Category


Recovery from hangup of spoolsv

Yesterday one of the server hanged because of printer spooler service
No one  is able to log on to the server, when users try to log on there is just a blank screen.

Nobody is able to access the console because the server is in a remote datacenter, and VNC access is not working as a result. How was I able to gain access to the server?

Because I know that spoolsv is the main reason the server hanged, I logged on to the member terminal server. I needed to gain access to the hanged server services. Opening services.msc and connecting to remote terminal server gave me services from the hanged computer. Then, just a simple restart of the printer spooler brings the server back to life.


If spoolsv is in error state

Yesterday  explained how to restart spoolsv server (printer spooler) if it exceeds 40MB of memory.
Sometimes spooler service will hang and there will not be high memory consumption, so we would need to detect that problem as well. For this scenario I have written the following script:
net start | findstr /i Spooler > nul
if not errorlevel 1 goto end
net stop Spooler
sleep 2
net start Spooler
:end
exit

I created a scheduled task to run this script under system every minute, for 24 hours a day. If spoolsv is OK, the script will just close, and  if it is in error state, the script will restart the printer spooler service.