Hi Fellow Monks
I am currently trying out FastCGI on IIS and have some basic questions that I hope that some of you can shed some light on.
First a bit little bit of background. I am working on a web
application that have existed for something like 10 years. It is written as a pure CGI application. Most of the application use
CGI::Application, but some older parts are just plain old CGI .pl script that print directly to STDOUT. In total the application
contains about 100.000 lines of Perl code in addition to templates, Javascript, etc. Clients buying the application can either
have it hosted on our servers or we can install it on-site. Our own servers run IIS (not going to change) and all our clients
with on-site installs have IIS as well.
In general we have no problems with running the application using pure CGI except of course speed. The application is not
extremely slow, taking perhaps 1-2 seconds to answer a typical request, but if I could drop that to for instance 0.5 seconds for
a typical request I think it would greatly improve the application.
So in an attempt to speed up the application I thought I could try to run it under FastCGI. I have now tried running the
application using the FastCGI extension for IIS 5.1 from Microsoft and tried out both CGI::Fast and FCGI::IIS. I have partially gotten the application to run with a significant speed boost, but there seems that there are a number of tricky bugs that need to be fixed to get it to work flawlessly. Some of the bugs I have experinced are:
-
FCGI::IIS gives strange errors when creating a new CGI object.
-
Redirecting errors and warnings using CGI::Carp::carpout does not work with CGI::Fast.
-
Query parameters does not seem to be taken into account under CGI::Fast.
So before I spend any more time tracking down these bugs and others that will undoubtly crop up I have a few questions I hope some of you can answer.
-
Does anyone have experience with getting a pure CGI application to run under FastCGI? Was it a large effort? What type of changes where required? Any recommendations for how to proceed with the changes?
-
The application still needs to work under normal CGI as we probably will have problems getting the FastCGI extension installed on clients servers. Is it hard to get an application to work with both CGI and FastCGI at the same time?
-
Are anyone using the FastCGI extension from Microsoft or are the other alternatives that are better?
-
When running under CGI $FindBin::Bin contains that path of the executed CGI script. As the libraries are placed relatively to the scripts this is needed to set @INC correctly. Under FastCGI $FindBin::Bin contains the path to perl.exe making it harder to set @INC correctly. Is it possible to work around this somehow or is it something I just have to live with?
Any help and/or recommendations are greatly appreciated.
- oyse
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.