Multiple lpr.exe Jobs on Windows freezing with Event ID 4227

Written by James McDonald

October 4, 2011

I wasn’t going crazy… I finally tracked it down.

I was stress testing a new application by submitting lpr.exe jobs from windows clients using lpr.exe I tried it from:

  • Windows 7 Ultimate 64 bit
  • Windows Server 2008 (32 and 64bit)

Using a windows batch file:

@echo off
for /L %%i in (1,1,25) do ( 
	echo %%i
         rem Use ping to put a delay in
	rem ping -n 1 -w 5000
	lpr -S -P printqueue print_this.txt

The jobs would freeze as it appears now at the 11th job.

I was seeing Event ID 4227 in the lpr.exe client System logs

The cause is the “LPR Port Monitor” that you have to install to get lpr.exe has an LPR RFC limitation re:

On each client I added the following to the registry and all of a sudden I can submit 25 jobs as quickly as formtrap can receive them.



Submit a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

List local disks

GET-CimInstance -query "SELECT * from Win32_DiskDrive" DeviceID Caption Partitions Size Model -------- -------...

Create ISO using Powershell

Usage New-IsoFile -NewIsoFilePath C:\tmp\Hyper-V.iso-sources -ImageName Hyper-V -SourceFilePath 'C:\tmp\Hyper-V'...