Re: FastCGI / Apache problems

Steve Kann (stevek@io360.com)
Mon, 26 Aug 1996 13:11:32 -0400 (EDT)

From: Steve Kann <stevek@io360.com>
Message-Id: <199608261711.NAA09137@spheara.io360.com>
Subject: Re: FastCGI / Apache problems
To: desilva@mail.industry.net (Rujith S. de Silva)
Date: Mon, 26 Aug 1996 13:11:32 -0400 (EDT)
In-Reply-To: <3221C2AA.15FB7483@ind42.industry.net> from "Rujith S. de Silva" at Aug 26, 96 11:28:42 am

> Bob Ramstad wrote:
> > ok.  let me ask the obvious question.  is ANYONE using FastCGI in a
> > production environment?  if so, what servers and languages / libraries
> > are you using to build in order to get consistent behavior?  what OS
> > are you using?
> 
> One problem that I encountered: FastCGI claims that a CGI program can be
> changed to FastCGI with the addition of a line or two of code.  This is
> not quite true: a valid CGI program can call exit() at one or more
> points in the code, and this is sometimes a convenient way to handle the
> flow of control in the program.
> 
> Of course, using exit() in a FastCGI program is a BAD idea, and the CGI
> program would have to be massaged to (1) not call exit() (easy) and (2)
> re-route the flow of control appropriately (not quite that easy).
> 
> Programs with exit()s will give lots of problems when used as FastCGI
> programs: truncation of pages, server error messages, high server loads
> as the server repeatedly re-runs the programs as they exit, etc.

Well I can't comment on the whole reliability issue -- I haven't
_really_ beat on fastcgi yet, but the exit issue can be taken care of
pretty easily, I think..

in C, you could do atexit(FCGI_Finish), and that should clean things
up..

Of course, I haven't actually tested this.

-SteveK