Problem with CGI::Fast process
XC <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
Dear FCGI users:
I am very new to FCGI, so please bear with my silly questions.: -)
My problem is whenever I make a fatal error in my FCGI script
(mason_handler.fcgi), any visit to my website will stuck. I can not
see the FCGI process through:
ps aux | grep fcgi
Even if I correct the error, the FCGI process often comes back after
more than 10 minutes. I am not sure how and why this takes so much
time to recover from an error in the FCGI script?
If I update other code, I can use 'kill -9' to restart my FCGI
process. but in this case, my FCGI process can be invoked and I dont
know how to get my FCGI script back to work immediately after I
correct the error.. Is this normal or abnormal in FCGI and Perl ?? My
FCGI script is as following and I am using CGI::Fast 1.07, HTML::Mason
1.36, Apache 2.0.59, mod_fastcgi/2.4.2, the latest Debian box..
Thank for your time
LH
============== mason_handler.fcgi =============
#!/usr/bin/perl
use strict;
use warnings;
use CGI::Fast;
use HTML::Mason::CGIHandler;
{
package HTML::Mason::Commands;
use MyApp::Utils qw[ :myapp ];
use DBIx::Simple;
use YAML;
}
# lazily-instantiated variables
my $cgi;
my $h;
while ($cgi = new CGI::Fast())
{
my $h ||= HTML::Mason::CGIHandler->new
(
comp_root => '/shared/lihao/public_html',
data_dir => '/shared/lihao/var/mason/',
allow_globals => [ qw/ $db %session / ],
error_mode => 'fatal',
);
# hand off to mason
eval { $h->handle_cgi_object($cgi) };
if (my $raw_error = $@) {
print $raw_error;
}
}
exit 0;
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/