[cgiapp] CGIApp + FastCGI

Jeff MacDonald jeff at interchange.ca
Tue Jun 16 13:26:41 EDT 2009


>> If anyone can point me in a direction that would be helpful.
>
> You almost certainly are carrying data over from one request to the
> next, and with multiple processes running the one that services
> request number N+1 might not be the same one that served request
> number N, so you might not have the data that you expect.
>
> The challenge of being neat and clean between requests exists for both
> mod_perl and fastcgi.  It's touched on briefly here:
>
>  http://cgi-app.org/index.cgi?SitePerformance
>
> and if you search the site (from the search box on the front page) for
> fastcgi and/or mod_perl, you'll see a couple of more references.
>
>> From the Notes secition of the CGI::Application::FastCGI man page:
>
>   Note that cgiapp_init() will be called only once under lifecycle of
>   FastCGI. setup() will also only be called once. (you should not be
>   doing magical things in 'setup'.) So if you want to do something
>   for every REQUESTS, you should write the logic in cgiapp_prerun().
>


I ended up going with the ModPerl::Registry route. So far it seems to  
be working quite well.

Now, I just have to figure out how to print an alternative Header  
type , so my cgi can spit out PDF and excel files at users. :)

Thanks folks. Your direction helped.

--
Jeff MacDonald
jeff at interchange.ca








More information about the cgiapp mailing list