<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Perceptus Back Story &#187; rdp</title>
	<atom:link href="http://blog.perceptus.ca/tag/rdp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.perceptus.ca</link>
	<description>Issues and adventures in the life of a Canadian micro-sized geek company</description>
	<lastBuildDate>Tue, 31 Jan 2012 07:11:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Spoolsv.exe using lots of CPU on a Terminal Server</title>
		<link>http://blog.perceptus.ca/2009/07/17/spoolsv-exe-stuck-at-100-percent-cpu/</link>
		<comments>http://blog.perceptus.ca/2009/07/17/spoolsv-exe-stuck-at-100-percent-cpu/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:43:18 +0000</pubDate>
		<dc:creator>leonard</dc:creator>
				<category><![CDATA[annoying]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[technical support]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[rdp]]></category>
		<category><![CDATA[regdelnull]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[spooler]]></category>
		<category><![CDATA[spoolsv.exe]]></category>
		<category><![CDATA[stuck]]></category>
		<category><![CDATA[systernals]]></category>
		<category><![CDATA[terminal server]]></category>
		<category><![CDATA[winbps]]></category>
		<category><![CDATA[zebra]]></category>

		<guid isPermaLink="false">http://blog.perceptus.ca/?p=145</guid>
		<description><![CDATA[I have this recurring problem at one client&#8217;s site.  The setup is a small Windows 2003 Terminal Server environment, with remote POS terminals over the Internet &#8211; I don&#8217;t like this arrangement for the many single points of failure (a couple ADSL lines, a couple routers, a couple switches, a single server, etc.), but that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I have this recurring problem at one client&#8217;s site.  The setup is a small Windows 2003 Terminal Server environment, with remote POS terminals over the Internet &#8211; I don&#8217;t like this arrangement for the many single points of failure (a couple ADSL lines, a couple routers, a couple switches, a single server, etc.), but that&#8217;s beyond the scope of this post.</p>
<p>This client is happens to be running BBL, AKA WinPOS, AKA, WinBPS, over Terminal Server.  I have no comment on the software itself, it&#8217;s the arrangement of using it over Terminal Server over the Internet that makes me nervous &#8211; no, I had no input into this setup.</p>
<p>A further complication, is that the printers that the software uses, Zebra, label/ticket printers, have poor drivers that I don&#8217;t believe to be TS compatible.  They sometimes get stuck when the remote session is closed.  This eventually screws up the Windows spooler service.</p>
<p>When this system stops working, new Remote Desktop sessions fail to start properly.  After logging into the server, I will check the processor usage in Task Manager.  If the spoolsvc.exe process is using a lot of processor time, this is what I do:</p>
<p><strong>N.B. Follow at Your Own Risk.</strong></p>
<p>Stop the spooler service (no one will be able to print, but they probably can&#8217;t already):</p>
<pre>net stop spooler</pre>
<p>Open RegEdit.exe and browse to this part of the registry:</p>
<pre>HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\PRINT\PRINTERS\</pre>
<p>At times, I&#8217;ll find dozens of stale Terminal Server printers listed.</p>
<p>Export the registry keys first, to make a backup, just in case.</p>
<p>Then delete the Terminal Server printers from that same part of the registery, do NOT delete the local printers.  These are the ones with the &#8220;&#8230;on MyComputer &#8230; in session&#8230;&#8221; within the printer name.</p>
<p>Deleting these has worked for this particular server several times to resolve the CPU hogging spooler service (spoolsv.exe)&#8230; but sometimes they can&#8217;t be deleted in RegEdit.</p>
<p>Grab a copy of RegDelNull by Systernals, it&#8217;s free as in beer.</p>
<p>Use RegDelNull.exe to remove some of the entries that would not delete manually &#8211; I&#8217;m looking at you Mr. Zebra Printer Driver.</p>
<p>Here&#8217;s what that looks like (anonymized, of course):</p>
<pre>C:\Installs&gt;regdelnull HKLM\System\CurrentControlSet\Control\Print\Printers -s

RegDelNull v1.10 - Delete Registry keys with embedded Nulls
Copyright (C) 2005 Mark Russinovich
Sysinternals - www.sysinternals.com

Null-embedded key (Nulls are replaced by '*'):

HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\PRINT\PRINTERS\Zebra101 _
on MyComputer(from MyComputer2) in session 3\PrinterDriverData\Barcodes\(0x1701)*de 93</pre>
<p>You get a prompt to fix the Null.  Say &#8220;Yes&#8221;.</p>
<p>Then go back up a few steps and delete the problematic printer from RegEdit.  With the null value gone, you can delete it.</p>
<p>Then restart the spooler service.</p>
<pre>net start spooler</pre>
<p>If this works, the spooler will start, it won&#8217;t use a suspicious amount of processor cycles, and the RDP connections will start working immediately &#8211; no reboots required.</p>
<p>Then go and find updated drivers.</p>
<p>I&#8217;d be glad to hear about a better solution&#8230; please comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.perceptus.ca/2009/07/17/spoolsv-exe-stuck-at-100-percent-cpu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

