[cgiapp] CGIApp + FastCGI

Jeff MacDonald jeff at interchange.ca
Mon Jun 15 12:44:43 EDT 2009


Hi,

I'm cross posting this to CGIApp and FastCGI mailing lists, please  
don't hit me :)

I've taken over the development of a Perl/CGI::App in  house project.

It has never lived its live in any sort of environment like FastCGI or  
mod_perl and now perl startup times are starting to eat away at  
performance. [Actually they are destroying preformance]

I've tried running this application using both FastCGIServer and by  
using the AddHandler directive to allow dynamic restarting of the  
application.

The Perl FastCGI module I am using with my application is  
CGI::Application::FastCGI

If I ran it with only one -process the results were predictable. The  
application ran very quickly, screens came up as expected and it ran  
generally without errors.

However, when I was gearing up to shift into production, and turned  
the processes up to 5 it because very unpredictable. It felt like for  
some reason, one session was grabbing variables from other sessions.  
Thus loading the wrong templates for some sessions, or using the  
results of one query object in the wrong session and all that. More or  
less made the system impossible to use.

I'm not sure what guidelines I should be following to protect against  
memory sharing, or if that is even an appropriate description of my  
issue.

If anyone can point me in a direction that would be helpful.

--
Jeff MacDonald
jeff at interchange.ca








More information about the cgiapp mailing list