JS minify broken (was: RE: RT4 slowness)

I checked some pages and I have these 7 seconds on at least:

  • Login page
  • Search/Simple.html
  • Search/Build.html
  • Tools/MyDay.html
  • Admin/Users

This implies you’re requishing JS on every page, which points to a
misconfiguration.

Please provide details about your installation such as your apache
versions and configuration otherwise it’s quite difficult to test.
We’ve tried replicating in house, but haven’t seen this in any of
our test or production RT4 instances.

Apache 2.2.15, first email of the thread has all the details.

Your first email had differing paths in your preload and psgi_app lines,
so
I assumed it was a copy and paste error, so was hoping to get a clean
full
copy of your config.

Other things that would be useful are your sanitized RT_SiteConfig or
the
System Configuration from the Admin UI.

-kevin

Kevin, I’m also experiencing the same problem as reported here. (And yes,
I just filed a new, duplicate bug about that, [rt3 #17673].)
I can provide direct access (including root access) to the pre-production
VM I’m working with, if that would help?
Just for kicks, I tried substituting “/bin/cat” for
“/usr/local/bin/jsmin”, but after turning on a lot of debugging I just get
an error:

Log::Dispatch::ANON(‘Log::Dispatch=HASH(0x2aef1bb0fe40)’, 'failed to
jsmin: /bin/cat: standard output: Bad file descriptor^J ') called at
/opt/rt4/sbin/…/lib/RT/Squish/JS.pm line 99

With the same debug options on, I do not get the same error when
invoking jsmin. I do get the UI breakage, however :-).

CentOS 5.6, CPAN packages from RPMForge where possible, CPAN otherwise
(only as required).
Rt-4.0.0 from tarball.
Jsmin as downloaded from Crockford’s site today (compiled with stock gcc
on CentOS 5.6, no options).

I added another warning line to JS.pm to tell me if jsmin was being called
on each and every request, and it indeed is being called on every single
request.

Furthermore, if I examine the minified JS using Chrome’s developer tools,
it’s an empty file
(http://**.*./NoAuth/js/squished-d41d8cd98f00b204e9800998ecf8427e.js
= 0 bytes).

There is no such cached object on disk under /opt/rt4/var/, which I
suspect would be the problem. My Apache (and consequently mod_perl)
process does have write permission to /opt/rt4/var/mason_data to
…/session_data.

Don’t know what would be useful to try next…

-Adam Thompson
athompso@athompso.net

One additional note: the problem occurs under mod_perl, but NOT when
running rt-server standalone. That makes it an easy fix, for now :slight_smile:
I’m rather unclear on how to set up anything other than Apache2.2
w/mod_perl and RT4. Isn’t that the default configuration now, anyway?
-Adam

Kevin, I’m also experiencing the same problem as reported here. (And yes,
I just filed a new, duplicate bug about that, [rt3 #17673].)
I can provide direct access (including root access) to the pre-production
VM I’m working with, if that would help?
Just for kicks, I tried substituting “/bin/cat” for
“/usr/local/bin/jsmin”, but after turning on a lot of debugging I just get
an error:

Log::Dispatch::ANON(‘Log::Dispatch=HASH(0x2aef1bb0fe40)’, 'failed to
jsmin: /bin/cat: standard output: Bad file descriptor^J ') called at
/opt/rt4/sbin/…/lib/RT/Squish/JS.pm line 99

With the same debug options on, I do not get the same error when
invoking jsmin. I do get the UI breakage, however :-).

CentOS 5.6, CPAN packages from RPMForge where possible, CPAN otherwise
(only as required).
Rt-4.0.0 from tarball.
Jsmin as downloaded from Crockford’s site today (compiled with stock gcc
on CentOS 5.6, no options).

I added another warning line to JS.pm to tell me if jsmin was being called
on each and every request, and it indeed is being called on every single
request.

Furthermore, if I examine the minified JS using Chrome’s developer tools,
it’s an empty file
(http://**.*./NoAuth/js/squished-d41d8cd98f00b204e9800998ecf8427e.js
= 0 bytes).

There are patches for this on 4.0.1-releng, please retest when
4.0.1rc2 is released.

There is no such cached object on disk under /opt/rt4/var/, which I
suspect would be the problem. My Apache (and consequently mod_perl)
process does have write permission to /opt/rt4/var/mason_data to
…/session_data.

The JS is cached in memory, not as a mason object file.

-kevin

I’m rather unclear on how to set up anything other than Apache2.2
w/mod_perl and RT4. Isn’t that the default configuration now, anyway?

There are multiple configuration options documented in
docs/web_deployment.pod

-kevin