graceful restarts, modperl and pre-loaded modules
graceful restarts, modperl and pre-loaded modules
am 14.07.2009 20:04:55 von E R
Hi,
I was wondering how graceful restarts of apache interact with modperl
and "pre-loaded" modules.
Specifically, if the apache parent process loads module Foo.pm, and I
modify Foo.pm, can I use a graceful restart to get the apache parent
to read the new version of Foo.pm?
Thanks,
ER
Re: graceful restarts, modperl and pre-loaded modules
am 14.07.2009 20:36:34 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigF34765F3F9ABC388477B12D7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 14/07/09 14:04 , E R wrote:
> Hi,
>=20
> I was wondering how graceful restarts of apache interact with modperl
> and "pre-loaded" modules.
>=20
> Specifically, if the apache parent process loads module Foo.pm, and I
> modify Foo.pm, can I use a graceful restart to get the apache parent
> to read the new version of Foo.pm?
Yes, it should work that way.
On a gracefull restart, all perl interpreters are shutdown and new,
clean ones replace them, reloading any module you configure for preloadin=
g.
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enigF34765F3F9ABC388477B12D7
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/
iD8DBQFKXNA8yzKhB4jDpaURAjqFAJwNmwwodanyCSlsqkAZfrpmrgGStgCf aUaO
hGWqCL6WI6CfB4ZCQlOEH2k=
=hlSR
-----END PGP SIGNATURE-----
--------------enigF34765F3F9ABC388477B12D7--
Re: graceful restarts, modperl and pre-loaded modules
am 14.07.2009 21:00:08 von Perrin Harkins
On Tue, Jul 14, 2009 at 2:36 PM, Philippe M.
Chiasson wrote:
> On a gracefull restart, all perl interpreters are shutdown and new,
> clean ones replace them, reloading any module you configure for preloading.
I don't think this is right, Philippe, unless something has changed
with it in mod_perl 2. Graceful restart used to just re-read the
conf, not restart the perl interpreter.
- Perrin
Re: graceful restarts, modperl and pre-loaded modules
am 14.07.2009 21:25:43 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig8A8280B383CF1D8EDA0CA0D2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 14/07/09 15:00 , Perrin Harkins wrote:
> On Tue, Jul 14, 2009 at 2:36 PM, Philippe M.
> Chiasson wrote:
>> On a gracefull restart, all perl interpreters are shutdown and new,
>> clean ones replace them, reloading any module you configure for preloa=
ding.
>=20
> I don't think this is right, Philippe, unless something has changed
> with it in mod_perl 2.=20
Yup, this has certainly been fixed up in mod_perl 2.
> Graceful restart used to just re-read the
> conf, not restart the perl interpreter.
Now I believe it does, and it's easy to verify.
A loaded PerlModule will get reloaded on graceful restart, that's for sur=
e.
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enig8A8280B383CF1D8EDA0CA0D2
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/
iD8DBQFKXNu3yzKhB4jDpaURAhqHAJ9mjBH4uhTO9gIDQjPZCsdp+YleEgCg ldGg
xKOYZgIqoSADnXeewXPpHm4=
=mZj8
-----END PGP SIGNATURE-----
--------------enig8A8280B383CF1D8EDA0CA0D2--
Re: graceful restarts, modperl and pre-loaded modules
am 14.07.2009 22:18:18 von Perrin Harkins
On Tue, Jul 14, 2009 at 3:25 PM, Philippe M.
Chiasson wrote:
>> Graceful restart used to just re-read the
>> conf, not restart the perl interpreter.
>
> Now I believe it does, and it's easy to verify.
>
> A loaded PerlModule will get reloaded on graceful restart, that's for sure.
That won't be enough in all cases unless it actually replaces the
interpreter, like PerlFreshRestart used to.
I would do a graceful shutdown and restart.
- Perrin
Re: graceful restarts, modperl and pre-loaded modules
am 15.07.2009 11:42:49 von Clinton Gormley
> That won't be enough in all cases unless it actually replaces the
> interpreter, like PerlFreshRestart used to.
>
> I would do a graceful shutdown and restart.
I've had lots of problems with graceful restarts hanging indefinitely, I
think caused by issues with the mod_ssl module.
I'd also recommend: apachectl graceful-stop; apachectl start
clint