[Catalyst] Catalyst with apache, how to auto restart like run myapp_server.pl -r?

Perrin Harkins perrin at elem.com
Tue May 22 04:37:58 GMT 2007


On 5/21/07, Cookie <xiaoquqi at gmail.com> wrote:
> But I don't think when I modify my lib files,the modification seems not any
> effect.And I must restart my apache to make it available.
> My question is:
> Is there any way to configurate my apache configuration files to be
> available that I don't need to restart my apache server?(Like I run
> myapp_server.pl -r)

The usual way to handle this during development on mod_perl is to use
Apache::Reload.  However, there were reports that this doesn't work
with Catalyst because of the way it stores state information.  You can
try it and see.

There is no way to automatically pick up changes which is really
recommended for use in a production environment running mod_perl.  The
problem with things like Apache::Reload is that they ruin the
copy-on-write sharing of memory by modifying memory in each child
process, and this makes your application use more real memory.

It typically only takes a couple of seconds to do a stop and start of
a mod_perl server, so in practice this isn't a big deal for most
people.  A larger site will usually have a cluster of servers and a
load balancer that lets them restart their servers in sections.  You
can find more discussions of this in the mod_perl mailing list
archives.

- Perrin



More information about the Catalyst mailing list