PerlOptions +Parent
am 01.02.2010 11:48:19 von Carl Johnstone
Suggestion for a wishlist feature.
I've got around 20 different sites, each of which is configured as it's own
VirtualHost. Now from time to time I run a different newer version of our
app on some of the VirtualHosts, whilst leaving others running the original
code base.
Following some discussion here I tested and implemented the use of
"PerlOptions +Parent" and this works just fine.
However my only problem with this is that what I'm effectively doing is
running a separate perl instance for each of those VirtualHosts, sometimes
I'll have half a dozen - even though I've only got two codebases.
So rather than +Parent which just gives a VirtualHost a separate instance -
what would be nice would be some way of specifying *which* perl instance to
use in this VirtualHost. Something like:
ServerName www.example1.com
PerlInstance myappv4
ServerName www.example2.com
PerlInstance myappv4
Where www.example1.com creates a new instance named "myappv4", and
www.example2.com uses the instance the first vhost created.
Carl
Re: PerlOptions +Parent
am 01.02.2010 12:32:06 von torsten.foertsch
On Monday 01 February 2010 11:48:19 Carl Johnstone wrote:
> So rather than +Parent which just gives a VirtualHost a separate instance
> - what would be nice would be some way of specifying which perl instance
> to use in this VirtualHost. Something like:
>
>
> ServerName www.example1.com
> PerlInstance myappv4
>
>
>
> ServerName www.example2.com
> PerlInstance myappv4
>
>
Feasible by patching modperl's interpreter pool handling.
But how about using several apache instances and a mod_proxy-based proxy in
front to pass the requests to the appropriate instance? This can be
implemented without patching modperl.
Torsten
Re: PerlOptions +Parent
am 01.02.2010 15:10:10 von torsten.foertsch
On Monday 01 February 2010 13:23:19 Rolf Schaufelberger wrote:
> Am 01.02.2010 um 12:32 schrieb Torsten Förtsch:
> > On Monday 01 February 2010 11:48:19 Carl Johnstone wrote:
> >> So rather than +Parent which just gives a VirtualHost a separate
> >> instance - what would be nice would be some way of specifying which
> >> perl instance to use in this VirtualHost. Something like:
> >>=20
> >>
> >> ServerName www.example1.com
> >> PerlInstance myappv4
> >>
> >>=20
> >>
> >> ServerName www.example2.com
> >> PerlInstance myappv4
> >>
>=20
> same problem and same wishlist for me. Ii would also be glad to be able
> to create pools and assign them in the virtualHot directive
>=20
> >>=20
> >
> > Feasible by patching modperl's interpreter pool handling.
> >=20
> > But how about using several apache instances and a mod_proxy-based proxy
> > in front to pass the requests to the appropriate instance? This can be
> > implemented without patching modperl.
> >=20
> > Torsten
>=20
> Well, would PerlSwitches -I/path/to/myappv4 within each VirtualHost =
do
> that job ?=20
>=20
I think Carl is concerned here about memory usage. With the current=20
implementation each vhost gets its own interpreter. But he does not need th=
at=20
many interpreters. He needs far less than the number of vhosts he has defin=
ed.
So, I could imagine something like this:
PerlSwitches ...
PerlModule ...
PerlSwitches ...
PerlModule ...
PerlUseInterpreter myapp4
...
That would create 2 named interpreters myappv4 and myappv5. Then one can=20
decide which one to use in which vhost. To confuse the user a bit more it c=
an=20
even be made switchable in a . That mean up to one gets MapToStor=
age=20
one interpreter and from HeaderParser to the end another.
Torsten
Re: PerlOptions +Parent
am 08.02.2010 20:53:39 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig5B513BEAF9E8EB28A8558806
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 10-02-01 06:32 , Torsten Förtsch wrote:
> On Monday 01 February 2010 11:48:19 Carl Johnstone wrote:
>> So rather than +Parent which just gives a VirtualHost a separate insta=
nce
>> - what would be nice would be some way of specifying which perl inst=
ance
>> to use in this VirtualHost. Something like:
>>
>>
>> ServerName www.example1.com
>> PerlInstance myappv4
>>
>>
>>
>> ServerName www.example2.com
>> PerlInstance myappv4
>>
>>
> Feasible by patching modperl's interpreter pool handling.
Yes. and mod_python, IIRC, has such a mechanism. Might be worth
implementing, if there is a use for it.
> But how about using several apache instances and a mod_proxy-based prox=
y in=20
> front to pass the requests to the appropriate instance? This can be=20
> implemented without patching modperl.
That solution would also be my choice.
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enig5B513BEAF9E8EB28A8558806
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFLcGvDyzKhB4jDpaURAj5KAJ4g04werlaPmYL9h2kYj8un8zLVkACe NH3D
jSXedbENAbk9PaYC7ipgfDw=
=Da7R
-----END PGP SIGNATURE-----
--------------enig5B513BEAF9E8EB28A8558806--