Startup Script for mod_perl

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

2.23
Bugzilla 3.0
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

v2
1.75 KB, text/plain
justdave
: review+
Details
(Assignee)

Description

11 years ago
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.
(Assignee)

Comment 1

11 years ago
Created attachment 230016 [details]
v1

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?
(Assignee)

Updated

11 years ago
Attachment #230016 - Flags: review? → review?(justdave)
(Assignee)

Comment 2

11 years ago
Created attachment 234082 [details]
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)
(Assignee)

Comment 3

11 years ago
Oh, and the patch also requires the patch from bug 345547 in order to work completely.
Status: NEW → ASSIGNED
Depends on: 345547
(Assignee)

Comment 4

11 years ago
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.
(Assignee)

Comment 7

11 years ago
(In reply to comment #6)
> That URL is 404.

  Weird...it must be down. That's the right URL.
Flags: approval?
Flags: approval? → approval+
(Assignee)

Comment 8

11 years ago
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
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.