Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: mpm-worker + mod_perl2 settings meaning

by wrog (Friar)
on Nov 11, 2014 at 00:34 UTC ( [id://1106764]=note: print w/replies, xml ) Need Help??


in reply to mpm-worker + mod_perl2 settings meaning

Am I right, that perl interpreters being created and cached in the client proces and couldn't be tossed between them?

Short answer: no.

PerlInterpMax is max for the server. They are kept in a pool and assigned to child threads as needed, i.e., if there is a worker thread that needs a perl interpreter (not all of them do) for a particular request, then one gets fished out of the pool, connected up, used to service the request, and then put back in the pool when the child is finished with it. Different interpreters can be assigned to the same child at various times and a given interpreter can be used in multiple children; you have no way of knowing other than that the thread IDs can keep changing.

This was my motivation for creating Thread::IID, which gives you intepreter IDs, because there exist applications where you need to know which interpreter is which.

Although, to be fair, I later came to the conclusion that hardly anybody actually uses MPM-Worker on mod-perl2 production sites because of the numerous perl modules lurking out there (in 2014, still) that are not actually thread-safe (though I'll also note that it is actually possible to run MPM-Worker — I still do — you just have to be careful about which XS modules you're going to depend on; many of the core ones that matter have been taken care of at this point)

  • Comment on Re: mpm-worker + mod_perl2 settings meaning

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-18 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found