WSD printers crashing Print Spooler service in Windows 7

For a while now, I’ve been noticing that my Windows printer list would come up empty in the control panel, or when I tried to print something, I’d get an error that indicates that the Print Spooler service is not running.  Going and manually starting the Print Spooler service fixes the problem, but that’s silly, why should I have to do it?  Why is the Print Spooler service stopping at all?

Well, the cheesiest way to fix this problem is to set the Print Spooler service to automatically after failure.  Visit the Print Spooler service properties in the Services module in the MMC and click on the “Recovery” tab.  I found the default settings to be “Restart the Service” for first and second failures, but not for subsequent failures.  Set all three of the options to “Restart the Service.”

Alright… problem solved.

Except the Print Spooler service is still crashing, as I can see in the reliability monitor:

What’s this?  Some of these crashes are 10 minutes apart or less?  Even though the Print Spooler restart every time it crashes, I’d like to get rid of the crashes altogether.

Looking at the system event logs, I found error messages that correspond to the service crash times that look like this:

Faulting application name: spoolsv.exe, version: 6.1.7600.16385, time stamp: 0x4a5bd3d1
Faulting module name: wsdapi.dll, version: 6.1.7600.16385, time stamp: 0x4a5be0a1
Exception code: 0xc0000005
Fault offset: 0x000000000000769a
Faulting process id: 0x1340
Faulting application start time: 0x01cb3e447c97686a
Faulting application path: C:\Windows\System32\spoolsv.exe
Faulting module path: C:\Windows\System32\wsdapi.dll
Report Id: d1e7f7eb-aa38-11df-b6ff-caee131491bf

Ah ha!  wsdapi.dll is blamed for crashing the Print Spooler service.  Some research indicates that this DLL is used to talk to printers configured to print via WSD, or Web Services for Devices.

Turns out that we have a couple of printers at the office where I work that support WSD, and Windows 7 had automatically chosen WSD when I set them up using the printer setup wizard.  By the way, you can check to see if you have any printers set up to use WSD by opening Print Management (find it using the Start Menu search), and then clicking on Print Servers -> (your computer) -> Ports.  Any WSD ports will have a name starting with “WSD.”

Now, I don’t know if this crash is because of Microsoft’s WSD support, or flaky printer drivers, or a flaky WSD implementation on the printer itself, or what.  All of the print drivers I am using are either the ones bundled with Windows 7 or ones provided automatically by Windows Update, though.  Anyway, I decided to delete the WSD printers and set them up again using plain old TCP/IP printing without WSD, to see if that cured the problem.  Sure enough, it did.  Here’s how it goes.

In the printer setup wizard, after telling it you want to search for a network printer, make sure you choose the option that says your printer was not listed (even if it was).

Then say you want to add a printer by its IP address.

Then set the device type to “TCP/IP Device” instead of “Autodetect” or “WSD”…

And then, type in the IP address.

Then complete the printer setup as normal and repeat for any other WSD printers that you have.  If you got them all, no more crashes due to WSD!

Update: September 17, 2010

Barnkeeper below in the comments suggests that this is related to security issue MS10-061 (corrected by update KB2347290).  I have tested this and confirmed that the update does not fix the problem.  The Print Spooler service continues to crash even with the update applied.

Update: February 3, 2011

This issue still occurs in Windows 7 Service Pack 1.

23 thoughts on “WSD printers crashing Print Spooler service in Windows 7”

  1. Hi Aaron,

    I am searching for a WSD printers to use on a demo for my PhD
    So far, printer manufacturers are not giving me any garanty that the printer I will buy is a WSD capable.

    I see that you used WSD at work, can you please give me printer name or model you used which supports WSD technology.

    Thanks and Regards,
    Charbel

  2. BELOW IS THE EXPLANATION OF THE ISSUE AND THE SECURITY UPDATE THAT FIXES THE PROBLEMS WITH “PRINT SPOOLER SERVICES” NOT WORKING.
    http://www.microsoft.com/technet/security/bulletin/MS10-061.mspx

  3. I’m not convinced that the bug I described in this post is related to that security vulnerability. The bug occurred on a closed network and I’m quite sure that there was no malicious software around. In any case, I have installed the update, so I will re-test WSD to see if the issue is fixed and update this post with the results.

  4. Nice work, thanks. However, I wonder why this problem occurs only on some machines and not on others which use the same printers? The best solution would be to find the source of the problem, alas, I tried in vain…

  5. I came up with this fix a while ago for my wireless printers at work…the only problem that I have now, is that I recently deployed a new server that acts as the DHCP server, and I’m not sure if theres a a way to control DHCP reservation on SBS 2008. Otherwise the IP address of the printer could change everytime the DHCP lease renews.

  6. Surely there’s a way to reserve an IP address for a particular device (based on its physical address), for situations like this. If there’s not, you can always manually assign an IP address to your printer(s) (taking care to place it outside of the DHCP pool).

  7. On our Windows Print services we had numerous issues with WSD auto detecting printers and becomng unstable or unable to print. One solution we found was to disable WSD service on all new network printers deployed.

  8. Windows Server 2008 R2 Datacenter Service Pack 1 RTM:

    Confirmed still crashing when using WSD to connect to printers.

  9. Thanks. Am on way to fixing printer problem–this was part of it. Never would have been able to figure this part out, so thank you very very much. Never installed printer this way but seem to have peculiar problems arise after Microsoft updates?

  10. You’re a lifesaver, this bug was driving me (and my users) nuts, was starting to lose faith in Windows 7!

  11. Thank you!

    I just had this pop up on my 2008 R2 print server, and changing the 2 printers to tcp/ip and removing wsd ports fixed the issue.

    Kudos to OP.

  12. Awesome, exactly what I needed to resolve problem for client. Wish all fixes were typed out this completely. Thanks.

  13. It does seem an odd choice by HP to use these ports by default now, we’ve had numerous problems with them, and always switch to standard IP. WSD ports=more helpdesk calls.

    Seems to be a case of HP changing a proper mature technology for something really flaky just for the hell of it.

    Next they’ll be replacing all their mature & sensible range of screens with horrible black shiny cheap ones with external psu’s…… oh hang on…

  14. THANK YOU SO MUCH!!! I have been having this issue with a Lexmark E260dn and every computer worked fine before installing this. But after installing by clicking next and assuming windows would determine whats best, people’s printer spooler service would completely stop after printing 1 time. The only option i had was to go into the registry and remove everything from all printers and their drivers and re-installing the driver. Even this wouldn’t work every time though as a permanent solution. And this took way to much time to implement on a large amount of computers.

    I’ve been searching around on the internet for the past 3-4 hours trying to find some other suggestion besides the standard “re-install printer drivers blah blah blah”. So thank you again.

  15. Thanks! I’ve been trying to get our corporate helpdesk to find a solution to this, and they have been less than helpful. Finally, I tried a Google search, which led me to you.

  16. Thanks so much for this blog! I had exactly the same issue. After I removed the buggy WSD driver, no more spool crashes! Thanks!

  17. Thanks mate this helped me out so much you don’t even know. Thanks so much. My spooler was crashing every 31 mins for the last 3 days and I was getting ready to jump off a bridge.

  18. I have had this problem for months. WSD driver seemed to be the culprit. Thank you for this very helpful write up!

Leave a Reply

Your email address will not be published. Required fields are marked *

*