[cgiapp] CGI::App FastCGI and Forking Behavior

Justin J justin at dadamailproject.com
Wed Jan 7 19:44:36 EST 2015


Hi there - Happy New Year! 

I've been meaning to migrate over an enormous CGI project over to CGI::App, to gain FastCGI support for some time now, and well, things slip! So, yeah - late for the party. 

My porting over the CGI "app" (with no framework, really) to CGI::App couldn't have gone much easier - a lot of little tiny things had to be figured out, but nothing terrible. My WebApp.pm module weighs in at a bit over 12k LOC, so it's a fairly decently sized project. 

Moving the CGI::App to use FastCGI, rather than plain CGI has proved a little more problematic. I'm unsure over the use of this module: 

	https://metacpan.org/source/NAOYA/CGI-Application-FastCGI-0.02

As the docs on the cgi-app.org page, 

	http://cgi-app.org/index.cgi?FastCGI

don't jive with each other. I'm also concerned over these issues: 

	https://rt.cpan.org/Public/Bug/Display.html?id=17736

I don't know what I should worry about, or what has been figure out. 

Along with my testing, using the guidelines on the cgi-app.org FastCGI page (http://cgi-app.org/index.cgi?FastCGI) seemed to work the best. 

With the CGI::App::FastCGI module, I haven't found a way to give my app my own query object via the QUERY param (Part of the migration meant sort of deal with my own dispatch scheme, which means populating some CGI parameters). But it's no problem with what's on the cgi-app wiki page. 

I also have a question about code that fork()s. The FastCGI page: 

	http://www.fastcgi.com/drupal/node/5?q=node/11

Talks about using the Detach() and Attach() methods in FCGI, which seem easy enough to work with, but I have no idea how to work with them in CGI::App::FastCGI or CGI::Fast for that matter. Am I missing something obvious? 

Thanks for any help and guidance you can give, 

Justin 








More information about the cgiapp mailing list