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.

Problem:
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 1.0.0.1
	lpr -S 10.11.12.13 -P printqueue print_this.txt
)

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

I was seeing Event ID 4227 http://technet.microsoft.com/en-us/library/cc735929(WS.10).aspx in the lpr.exe client System logs

Cause
The cause is the “LPR Port Monitor” that you have to install to get lpr.exe has an LPR RFC limitation re: http://support.microsoft.com/kb/2003449

Resolution
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.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LPDSVC\lpr]
"UseNonRFCSourcePorts"=hex:01

0 Comments

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…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...