| Newsgroups |
gmane.comp.web.fastcgi.devel |
| Message-ID |
<[email protected]> |
Hi, David:
Thank you so much for your information. so the problem looks quite
normal, right? I am using FCGI on a webhosting server, so I don't have
access to the httpd.conf.. Is there any ways by configuring .htaccess
to terminate the FastCGI process whenever it encounters a fatal
errors(i.e. can not pass strictness checking under Perl) so that this
FCGI process won't hassle the server too much?? FastCgiConfig
directive seems only available from server configuration..??
Anyway, I will not touch the FCGI script too often in the later,
thanks for your suggestions.. :-)
Best,
LH
On 8/6/07, David Birnbaum <[email protected]> wrote:
> If your script crashes too many times in a row, Apache will stop forking it so
> it doesn't bog the server down. You can control this behavior with one of the
> FastCGI directives, I believe.
>
> Better - don't make edits on your production scripts, work in a dev environment
> and only copy things over once you get everything debugged.
>
> David.
>
> -----
>
> On Mon, 6 Aug 2007, XC wrote:
>
> > 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/
> >
>
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/