swaroop.m has asked for the wisdom of the Perl Monks concerning the following question:

Greetings to all Monks,
right now ,i have a perl file under IIS , the catch here is that each time a request is made, a perl executabe is loaded into the memory . If there are 5 requests , 5 instances of perl executable are running on the machine , to handle the 5 concurrent requests.
This leads to performance overhead when there are more requests, the IIS ends the requests without serving them.
Monks who have worked with Apache, Please inform me abt the performance of Apache Web Server with mod_perl module (read that it doesnot create multiple instances of Perl executable) ,hosting a web site handling thousands of concurrent requests.
how good is this approach in production?
Swaroop

Replies are listed 'Best First'.
Re: PERL ,IIS, Apache, mod_perl
by inman (Curate) on Sep 22, 2004 at 10:45 UTC
      Hi,
      We were using ActivePERL when we ran into some troubles. When we downloaded some modules from CPAN and started using , we were unable to install those modules. So we followed the best approach , download source code and make our own perl.exe and configure perl cgi extensions to IIS. However , we donot intend to use the ASPN dll for the obvious reasons mentioned in the ASPN Site
      "PerlIS DLL runs in the process space of the server, your web server is more susceptible to crashes and hangs caused by programming errors".(from aspn site)
      Thanks for providing insight and quick response,
      thanks a lot.
      Regards,
      Swaroop
        Well, technically, mod_perl is also in the process space of Apache. However, IIS only runs one process (multithreaded). In my experience, if it hangs, your site it down. Apache+mod_perl will typically run w/multiple processes. This means if one hangs, the others can still serve requests.
        This isn't entirely true...

        If you go into the properties page of the Virtual directory that you are using and select 'High (Isolated)' in the Application dropdown. The Perl for ISAPI DLL will now be started in a separate process (a DCOM server) called dllhost that persists between calls to the server. This process can be killed using task manager and is resurected next time round.

        If you have problems getting this to work then you need to add the IWAM_<server> user to your 'users' group. The DCOM server is owned by the IWAM_<server> account. You will need to remember this when accessing network resources etc. with your Perl script.

        Your issue with installing CPAN modules is unlikely to be related to the method that you use to execute your script. If you are having problems running your script then permissions are likely to be the problem.

Re: PERL ,IIS, Apache, mod_perl
by borisz (Canon) on Sep 22, 2004 at 09:55 UTC
    ...how good is this approach in production?
    excelent!
    read more on the mod_perl website:
    mod_perl
    httpd.apache.org
    Boris
Re: PERL ,IIS, Apache, mod_perl
by xorl (Deacon) on Sep 22, 2004 at 14:15 UTC
    I highly recommend Apache/mod_perl/MySQL on Linux. At the last place I worked, we had all of our clients on one server. The server was built new, just after RedHat 6.2 came out. Other than applying patches and replacing a bad stick of RAM nothing has been done to it. Last I heard they were getting 2000-3000 hits a day on the server. Dump IIS now.
Re: PERL ,IIS, Apache, mod_perl
by perrin (Chancellor) on Sep 22, 2004 at 18:49 UTC
    It will always require 5 Perl interpreters to handle 5 requests at once. However, mod_perl is much more efficient than the CGI approach being used by IIS because it doesn't need to fork a process and the interpreter is already loaded. The code will stay in memory once it is compiled the first time as well.

    If you'd prefer to stick with IIS, look at ActiveState's PerlEx product, which offers functionality similar to mod_perl for IIS.