Closed Bug 345376 Opened 13 years ago Closed 13 years ago
Startup Script for mod
We want to have a startup script for mod_perl that we include with Bugzilla. The way that Bugzilla is currently set up, it's not *necessary* to have a startup script, but it's a nice thing to have. This is a script that Apache loads when it first starts up, by using the PerlRequire directive in Apache's configuration. It can load modules into shared memory, so that each httpd child doesn't have to have a copy of the module in memory. We also need it to take advantage of Apache::DBI, which caches database connections so that they don't need to be re-made every time somebody loads a page. In addition, the startup script can *theoretically* pre-compile all scripts. However, this doesn't actually work with Bugzilla code, apparently. So in the script I attach, we won't be doing that. I have a startup script that I've been using on landfill that's worked fairly well.
The file should be fairly self-explanatory, with the comments. I picked the Bugzilla modules that are most frequently used and slowest to load, but I didn't use *all* Bugzilla modules because I don't want every httpd child to be automatically huge in memory.
Attachment #230016 - Flags: review?
Attachment #230016 - Flags: review? → review?(justdave)
Okay, here's a second verison. This version had been running on landfill for some time now. The only problem is the one described in bug 347845, but I think we should actually check this code in so that we can go ahead with handling any memory problems that come up in production or testing.
Oh, and the patch also requires the patch from bug 345547 in order to work completely.
Status: NEW → ASSIGNED
Depends on: 345547
For reference, here's LiveJournal's mod_perl startup script: http://code.sixapart.com/trac/livejournal/browser/trunk/cgi-bin/modperl.pl It's much fancier than ours, and it's also for mod_perl v1 (while we're using v2).
Comment on attachment 234082 [details] v2 This matches pretty close to what I remember doing with Zippy and with what we've discussed on IRC, and it seems to run without crashing. :)
Attachment #234082 - Flags: review?(justdave) → review+
(In reply to comment #4) > For reference, here's LiveJournal's mod_perl startup script: > > http://code.sixapart.com/trac/livejournal/browser/trunk/cgi-bin/modperl.pl That URL is 404.
(In reply to comment #6) > That URL is 404. Weird...it must be down. That's the right URL.
RCS file: /cvsroot/mozilla/webtools/bugzilla/mod_perl.pl,v done Checking in mod_perl.pl; /cvsroot/mozilla/webtools/bugzilla/mod_perl.pl,v <-- mod_perl.pl initial revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.