Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Misery: trying to get mod_perl working on Windows 2008

by Anonymous Monk
on Aug 03, 2012 at 16:22 UTC ( #985277=note: print w/replies, xml ) Need Help??

in reply to Misery: trying to get mod_perl working on Windows 2008

I know this is probably not helpful in your case, but you should not use mod_perl unless your scripts actually need the Apache integration (that is, you want to modify requests, not just serve pages). Of course, you can use it for plain CGI-ish serving but it is rather heavy-weight for that.

BTW, have you tried XAMPP? It claims to include mod_perl, and a 5.16 strawberry, too. Alas, no Win2k8 support that I can see.

  • Comment on Re: Misery: trying to get mod_perl working on Windows 2008

Replies are listed 'Best First'.
Re^2: Misery: trying to get mod_perl working on Windows 2008
by rpnoble419 (Pilgrim) on Aug 05, 2012 at 16:53 UTC
    Why are you recommending NOT to run mod_perl? Just would like the thought on this...
      Why are you recommending NOT to run mod_perl?

      Well, there are some reasons not to use mod_perl. The main reason is that there is only one Perl interpreter instance (actually, there is one per worker process, cloned around forking the worker process). It runs inside the Apache process. Forking and cloning may cause some minor trouble, but that's rarely a problem. Mostly, this affects DBI, and Apache::DBI knows enough of DBIs internals to handle most of the problem. On Windows, Apache does not fork (as far as I know), but creates threads instead. So, everything runs in a single process.

      The real problems are:

      • all applications have to share the one interpreter (per process)
      • all applications run in the process context of the Apache process
      • a single application error kills the entire Apache process
      • a single application error happening before Apache forks its worker processes kills the entire webserver

      So, applications are de facto not isolated from each another, and you can not use operating system permissions to limit access to only one application or to the web server.

      Compare with FastCGI:

      • The FastCGI process uses a single Perl interpreter for each application.
      • Each application runs inside its own process context, so you can isolate the applications using different users, filesystem permissions, chroot jails, and so on.
      • FastCGI communication uses sockets, either local ("Unix") sockets or TCP sockets. So you can run applications on different machines, perhaps behind firewalls that further isolate the web server.
      • FastCGI is available not only for Apache, but also for Nginx, IIS, Roxen, Lighttpd, and several other servers. So you don't have to re-invent the wheel just because you switch to a different webserver.

      Of course, because FastCGI runs outside the Apache server, you have some communication overhead. And you can't use all of the Apache internals that mod_perl offers but rarely anyone uses.


      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        Thank you for your thoughts on this. I had a discussion with a friend of mine and I had the same issues you just brought up about the Perl interpreter instance. I did not know about the other issues, so again thank you for enlightening me...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985277]
and the grasshoppers chirp...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-01-24 01:29 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (200 votes). Check out past polls.