Closed
Bug 1351695
Opened 7 years ago
Closed 7 years ago
Allow apache to ignore .htaccess for increased performance
Categories
(bugzilla.mozilla.org :: General, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dylan, Assigned: dylan)
References
()
Details
Attachments
(1 file, 2 obsolete files)
4.58 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
if you run strace on httpd during normal operation, you'll see we make thousands of stat() calls to .htaccess files. One request for a file under /data/assets is three calls to stat(), and if NFS is involved those calls can take a decent amount of time. We don't need to do this, we already send configuration directives to apache from mod_perl. I intend to make mod_perl.pl read in the .htaccess file, and send the configuration to apache and also send AllowOverride None, which will prevent apache from looking for .htaccess files.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8852524 -
Flags: review?(glob)
Comment on attachment 8852524 [details] [diff] [review] 1351695_1.patch Review of attachment 8852524 [details] [diff] [review]: ----------------------------------------------------------------- as per irc, there's multiple .htaccess files to accommodate: https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/Install/Filesystem.pm#L340
Attachment #8852524 -
Flags: review?(glob) → review-
Assignee | ||
Comment 3•7 years ago
|
||
I moved this to its own file as it is easier to validate outside of apache: perl -T -I. -MBugzilla::ModPerl -E 'say Bugzilla::ModPerl->apache_config(".")' and it now looks for all .htaccess files.
Attachment #8852524 -
Attachment is obsolete: true
Attachment #8852591 -
Flags: review?(glob)
Assignee | ||
Comment 4•7 years ago
|
||
sans Alive logging code.
Attachment #8852591 -
Attachment is obsolete: true
Attachment #8852591 -
Flags: review?(glob)
Attachment #8852593 -
Flags: review?(glob)
Comment on attachment 8852593 [details] [diff] [review] 1351695_3.patch Review of attachment 8852593 [details] [diff] [review]: ----------------------------------------------------------------- r=glob ::: Bugzilla/ModPerl.pm @@ +5,5 @@ > +# > +# This Source Code Form is "Incompatible With Secondary Licenses", as > +# defined by the Mozilla Public License, v. 2.0. > + > +package Bugzilla::ModPerl; a package so good it was declared twice. this may be better named Bugzilla::ModPerlConfig as that's all it does. @@ +17,5 @@ > + > +# We don't need (or want) to use Bugzilla's template subclass. > +use Template (); > + > +sub apache_config { a comment about why this is necessary would be helpful here. @@ +28,5 @@ > + my $wanted = sub { > + package File::Find; > + our ( $name, $dir ); > + > + if ( $name =~ /\.htaccess$/ ) { $name =~ m#/\.htaccess$#
Attachment #8852593 -
Flags: review?(glob) → review+
Assignee | ||
Comment 6•7 years ago
|
||
With corrections To git@github.com:mozilla-bteam/bmo.git b2744a5..30c35b3 master -> master
Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•