http://www.perlmonks.org?node_id=1181633

sduggal has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I am relatively new to the world of Perl and web frameworks. I have created a Mojolicious application which runs great using daemon on my Windows Server 2008 machine. But when I tried to deploy it using IIS7.5+FastCGI using the information here:

https://translate.google.com/translate?hl=en&sl=ja&u=http://multix.jp/iis8-fastcgi-mojolicious-lite/&prev=search

the application started behaving very slow.

The application is renderd in 4-5 seconds the first time. But subsequent calls are all good, a few ms as with daemon.

I tried to debug what was causing this 5 second delay using an empty mojolicious application, and it seems the first call to start_app takes a long time to execute. Here is the Mojolicious entry point script hello_app.fcgi:

use strict; use warnings; use FCGI; use FindBin; BEGIN { unshift @INC, "$FindBin::Bin/../lib" } use Mojolicious::Commands; if ($ENV{APP_POOL_CONFIG}) { use FCGI; my $request = FCGI::Request(); while ( $request->Accept >= 0 ) { $ENV{MOJO_MODE} = 'production'; # Start command line interface for application Mojolicious::Commands->start_app('HelloApp'); }} else{Mojolicious::Commands->start_app('HelloApp', "cgi"); }

I am struggling at this. Has anyone faced a similar issue. Please point me in the right direction. Thanks