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


In reply to Help: Mojolicious+FastCGI+IIS by sduggal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.