I have a very simple application that is printing TIFF files to a variety of networked printers. The printers are all installed on 3 different print servers, while the application runs on a separate machine. (Lets call them Print1,2,3, and App1.)
Most of the time this works well, but lately I have noticed that certain new printers (HP P4515x model using PCL6 drivers) are causing a spike in the number of handles opened by spoolsv.exe on App1. One document can raise the handles by 500, and they are never released, which eventually leads to the App1 machine having to be rebooted if this isn't caught in time. None of the actual print servers seem affected by this issue.
The code is doing something very similar in concept to this, but from a background service running under a domain account: MSDN Link. I am specifying the printer using the \print3\deptP4515x naming convention.
[Not sure if this goes on StackOverflow or ServerFault, but I think due to the possible driver issue, it should be on here?]
EDIT: I ran procexp and see that of the 1243 handle it has grown to, 1135 are this: Key HKLM\SOFTWARE\Hewlett-Packard\San Diego Shared IO