[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-users
Subject:    Re: IIS Crashes on perl error
From:       Michelle Davis <michelle () weftweb ! net>
Date:       2005-02-28 23:27:29
Message-ID: 4223A8E1.7080705 () weftweb ! net
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


John Deighan wrote:

> At 09:46 PM 2/27/2005, Michelle Davis wrote:
>
>> Hi All,
>>
>> We have an ActivePerl setup on WinXP Pro with IIS 5. We have mapped 
>> perlis.dll to .pl and everything pretty much works fine. One little 
>> problem, if anything is wrong with a script and it generates an error 
>> - it writes the error fine to PerlIS-Err.log (took me a while to find 
>> this log ;->> ) but (and this is a big BUT) - it also hangs IIS. This 
>> means that unless I restart it, no further processing of any webpages 
>> can be done with IIS.
>>
>> Does anyone know how to address this? All I want is for IIS to not 
>> crash out as we have to deploy this in a production enviroment and 
>> can't have all of IIS going down everytime an error occurs in a Perl 
>> script.
>>
>> Just so you know ... there is nothing special about the errors - any 
>> error of any type that gets reported in perlIS-err.log will stop IIS 
>> - missing module, bad syntax, output to STDERR they all bring IIS down.
>
>
> Most of the errors can be caught in an eval block. For example, we do 
> something like the following:
>
> eval {
>         <your code>
>         <output normal web page>
>         };
> if ($@) {
>         <output error page, displaying message in $@>
>         )
>
>
Thanks for this - I am going to replace all the STDError warnings with 
output to the application log - but what concerns me more are the 
untrappable errors - like a simple syntax problem. While in theory, 
untested code should never be on the production server, we can't place 
the stability of IIS on that hope.

Is this normal behaviour for perlis.dll with IIS5 or have I configured 
something incorrectly? I understand that perl.exe shouldn't cause this 
problem (though it will be slower - however this is not a high traffic 
application - but we get a different problem using perl.exe which I will 
post seperately.


Ciao,

Michelle

> _______________________________________________
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

-- 

Websites at Work - Websites created to put you in control.
_http://www.websitesatwork.com.au/websiteneeds.html_
E: _mailto:info@websitesatwork.com.au_ P: +61 (0)2 6161 9376
F: +61 (0)2 8569 1505 M: +61 (0)412 819 376

[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
John
Deighan wrote:
<blockquote
 cite="mid6.1.2.0.2.20050228082952.058803d8@exchange.pcgus.com"
 type="cite">At 09:46 PM 2/27/2005, Michelle Davis wrote: <br>
  <blockquote type="cite">Hi All, <br>
    <br>
We have an ActivePerl setup on WinXP Pro with IIS 5. We have mapped
perlis.dll to .pl and everything pretty much works fine. One little
problem, if anything is wrong with a script and it generates an error -
it writes the error fine to PerlIS-Err.log (took me a while to find
this log ;-&gt;&gt; ) but (and this is a big BUT) - it also hangs IIS.
This means that unless I restart it, no further processing of any
webpages can be done with IIS. <br>
    <br>
Does anyone know how to address this? All I want is for IIS to not
crash out as we have to deploy this in a production enviroment and
can't have all of IIS going down everytime an error occurs in a Perl
script. <br>
    <br>
Just so you know ... there is nothing special about the errors - any
error of any type that gets reported in perlIS-err.log will stop IIS -
missing module, bad syntax, output to STDERR they all bring IIS down. <br>
  </blockquote>
  <br>
Most of the errors can be caught in an eval block. For example, we do
something like the following: <br>
  <br>
eval { <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;your code&gt; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;output normal web page&gt; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }; <br>
if ($@) { <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;output error page, displaying message in $@&gt; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) <br>
  <br>
  <br>
</blockquote>
Thanks for this - I am going to replace all the STDError warnings with
output to the application log - but what concerns me more are the
untrappable errors - like a simple syntax problem. While in theory,
untested code should never be on the production server, we can't place
the stability of IIS on that hope.<br>
<br>
Is this normal behaviour for perlis.dll with IIS5 or have I configured
something incorrectly? I understand that perl.exe shouldn't cause this
problem (though it will be slower - however this is not a high traffic
application - but we get a different problem using perl.exe which I
will post seperately.<br>
<br>
<br>
Ciao,<br>
<br>
Michelle<br>
<br>
<blockquote
 cite="mid6.1.2.0.2.20050228082952.058803d8@exchange.pcgus.com"
 type="cite">_______________________________________________ <br>
Perl-Win32-Users mailing list <br>
  <a class="moz-txt-link-abbreviated"
 href="mailto:Perl-Win32-Users@listserv.ActiveState.com">Perl-Win32-Users@listserv.ActiveState.com</a>
  <br>
To unsubscribe: <a class="moz-txt-link-freetext"
 href="http://listserv.ActiveState.com/mailman/mysubs">http://listserv.ActiveState.com/mailman/mysubs</a>
  <br>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<div class="moz-signature"><br>
<meta content="text/html;" http-equiv="Content-Type">
<title></title>
<small><font face="Helvetica, Arial, sans-serif"> Websites at Work -
Websites created to put you in control. <br>
</font><font color="#0000ff" face="Helvetica, Arial, sans-serif"><u><a
 href="http://www.websitesatwork.com.au/websiteneeds.html"
 eudora="autourl">http://www.websitesatwork.com.au/websiteneeds.html</a></u></font><font
 face="Helvetica, Arial, sans-serif">
<br>
E:
<a href="mailto:info@websitesatwork.com.au" eudora="autourl"><font
 color="#0000ff"><u>mailto:info@websitesatwork.com.au</u></font></a>
P: +61 (0)2 6161 9376<br>
F: +61 (0)2 8569 1505 M: +61 (0)412 819 376</font></small>
</div>
</div>
</body>
</html>


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic