[Koha-bugs] [Bug 9005] Changing sysprefs requires restart under Plack

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 1 23:42:06 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9005

--- Comment #7 from Paul Poulain <paul.poulain at biblibre.com> ---
http://advent.plackperl.org/2009/12/day-4-reloading-applications.html says
===========================
Reloading sucks? Shotgun!

Reloading a module or application on a persistent perl process could cause
problems, like some module package variables are redefined or overwritten and
then stuck in a bad state.

Plack now has Shotgun loader, which is inspired by Rack's shotgun and solves
the reloading problem by loading the app on every request in a forked child
environment.

Using Shotgun loader is easy:

> plackup -L Shotgun myapp.psgi

This will delay load the compilation of your application until the runtime, and
when a request comes, it forks off a new child process to compile your app and
returns the PSGI response over the pipe. You can also preload the modules that
are not likely to be updated in the parent process to reduce the time needed to
compile your application.

For instance, if your application uses Moose and DBIx::Class, then you can say:

> plackup -MMoose -MDBIx::Class -L Shotgun myapp.psgi

would speed up the time required to compile your application in the runtime.
========================
another possibility ?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list