Closed Bug 345376 Opened 18 years ago Closed 18 years ago

Startup Script for mod_perl

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.23
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

1.75 KB, text/plain
justdave
: review+
Details
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.
Attached file v1 (obsolete) —
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)
Attached file v2
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.
Attachment #230016 - Attachment is obsolete: true
Attachment #234082 - Flags: review?(justdave)
Attachment #230016 - Flags: review?(justdave)
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.
Flags: approval?
Flags: approval? → approval+
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: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: