Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Running a script under mod_perl can be a confusing world to learn about.

The point of mod_perl is that it's a Perl interpreter baked into the Apache web server. Instead of having to run the script (and therefore Perl) every time there's a web request, mod_perl loads the script in a ready-to-run form, so as to improve performance.

Falling back to food analogies (because they're easy for me), it's a bit like a diner making up a batch of pancake batter and having the griddle hot, so that when a customer shows up, the batter can go right onto the hot grill, and pancakes are up five minutes later. The alternative would be to make individual batches of batter for each customer who orders pancakes. I think you can imagine that's not as efficient.

Your experimental results show that Apache is dispatching a request to a variety of kids (diner kitchens), identified by pid. Each request is served (from that kitchen), showing a monotonically increasing count (pancake order count). You should be aware that there's a configuration parameter in the Apache config called something like MaxRequests. When a kid has maxed out its number of requests (that kitchen ran out of batter), it's terminated and a new kid is created (the kitchen makes up a new batch of batter).

Are you just seeing how it all works, or is there some issue that remains a mystery to you? mod_perl has been around for quite a while, but these days I'd guess it's now classified as old technology. :)

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.


In reply to Re: mod_perl children process by talexb
in thread mod_perl children process by LorCo

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-03-28 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found