Process Isolation of Print Jobs
Print jobs can run in an isolated process instead of inside the main Direct Print service process. This can improve stability in environments where printer drivers are unreliable or where a single print job may hang for an extended period.
When process isolation is enabled, the service launches a separate worker process to handle printing. If a printer driver blocks or crashes, the problem is limited to that print worker instead of affecting the entire service.
When to use process isolation
Process isolation is useful when:
- A specific printer driver occasionally hangs during printing.
- A failed print job prevents later jobs from being processed.
- You want better resilience in environments with unstable printer infrastructure.
Using isolated print jobs adds a small performance cost because the service must start and manage a separate process. In return, you get better protection against printer-driver-related issues.
Configuration
The behavior is controlled by settings in the Direct Print service config.json file.
These settings are used for process isolation:
- ProcessIsolation: Enables printing in a separate process when set to
true. - TimeOut: The maximum number of seconds a single print job is allowed to run before it is stopped.
- IdleTimeOut: The number of seconds the isolated worker process stays in memory after the last print job before it is closed.
Example:
{
"Version": 1,
"Environments": [
{
"Name": "default",
"DebugLevel": 1,
"ProcessIsolation": true,
"TimeOut": 300,
"IdleTimeOut": 60,
...
Notes
Choose a TimeOut value that is long enough for your largest expected print jobs. If the value is too low, valid print jobs may be terminated before they finish.
Use IdleTimeOut to balance performance and resource usage. A longer idle timeout reduces process startup overhead for frequent printing, while a shorter timeout frees resources more aggressively.
For more information about the Direct Print service configuration file, see Configuration of Service.