Forum How do I...?

orphan prince.exe processes

dorianwinterfeld
Hi - I am using Perl to run Prince from a Web app on Windows 2003/IIS6 like so:

$princecmd = 'C:\Progra~1\Prince\Engine\bin\prince.exe';
print "Content-Type: application/pdf\n\n";
print "Content-Disposition: attachment; filename=foo.pdf\n\n";
if (! open(PRINCE, "| $princecmd --baseurl=$baseurl --no-embed-fonts --no-subset-fonts --log=\"$errlog\" -")){
print "Error starting Prince\n";
exit;
}
print PRINCE $html || die "can't write to prince; $!";
close(PRINCE);

This has been working well for years now but recently we have been getting orphan Prince.exe processes that are bogging down the server and pegging the CPU at 100%. I am using the taskkill command and Task Scheduler in a attempt to kill these processes. Does any one have advice? Is there a way to tell Prince to exit if it hangs for a period of time?
mikeday
Which version of Prince are you using? Try passing "--silent" on the command line to ensure that Prince isn't deadlocking trying to write error or warning messages to the standard error stream. Are any errors showing up in the log?
dorianwinterfeld
We are using Prince 7.0.
Thanks, I will try --silent and check the error logs.