According to https://perl.apache.org/docs/2.0/user/performance/mpm.html, mod_perl 2.0 is perfectly capable running in the thread MPM. but the ebuild is configured to FORCE prefork mpm. This is wrong not only because the page above clearly states that mod_perl works with threads, but also the prefork MPM disallows the http2 module. So you can use prefork OR http2, but not both. Can we please get the ebuild changed to allow the thread MPM for apache? Thanks!
>configured to FORCE prefork mpm What I see is: !ithreads? ( www-servers/apache[-apache2_mpms_event,-apache2_mpms_worker,apache2_mpms_prefork] ) Which means this forcing only happens with USE=-ithreads, could you try setting it? (will be needed on perl as well) On a side-note, make sure to run "perl-cleaner --reallyall" after flipping that ithreads flag on perl, ebuild will give some warnings too.
I see, but since I never specifically set -ithreads that seems counterintuitive. Can't we get the system to default to ithreads UNLESS the ithreads flag is specifically removed (-ithreads)?
As I understand it interpreter-based threads (ithreads) on perl is rarely needed for modern software, and perl upstream discourage its use[1], and it also cause ABI compatibility issues thus the whole rebuilding issue. The flag exists for old software that need it, but being default may not be preferable. [1] https://perldoc.perl.org/threads#WARNING
I can see that. The question is, what method allows both mod_perl stability AND http2 support? The Prefork MPM doesn't support http2, and the threads module isn't safe according to the docs on the site. But for mod_perl those seem to be the only options. I suppose you could enable multiple MPMs and then only use one of them. I always preferred threaded approach because it's more efficient. Correct me if I'm wrong, but just because ithreads is enabled doesn't necessarily mean that you will automatically use the ithreads method, right? Obviously if I disable the ithreads flag on perl and on mod_perl then mod_perl is going to force prefork, which is what I'm trying to avoid since prefork doesn't support http2. That leaves worker and event. Worker may work, but it's the least efficent of the Apache MPMs. So If I specifically enable the event MPM but leave mod_perl and perl with ithreads enabled in the use so that mod_perl won't try to force prefork, is that going to be safe?
Being discouraged doesn't mean it can't be used or necessarily unsafe (assuming adequate use by the software). It's just not suitable to be a default, especially given most users don't need ithreads. If this is what you need, then there should be no problems enabling it beside the one time inconvenience. Feel free to re-open as unconfirmed if you believe you need more clarification, I'll assign this to the perl team instead that will be more qualified to answer.