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?
$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?