Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.The 1.5 release seems to have made internal changes which require a significantly higher PHP memory limit; on different sites and in different areas (VBO operations, node_clone, panels frontpage, etc.) I'm getting errors like this:
Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to allocate 260176 bytes) in /var/www/drupal/sites/all/modules/javascript_aggregator/jsminplus.php on line 1680
Most of those sites are already running at 150M-200M, and changing ini_set('memory_limit', '200M'); in steps of 25M does not help (for performane reasons I can't go beyond 250M), so I have to disable JS_Aggregators because it takes those sites down.
Environment/Configuration:
- Pressflow 6.19
- JavaScript Aggregator 6.x-1.5
- Optimize and Minify JavaScript files: Enabled
- GZip JavaScript: checked
- Use JSMin+ instead of JSMin: checked
- Do not auto generate .htaccess file: no checked
After disabling JS_Aggrator, the sites are back to normal operation.










Comments
Comment #1
derjochenmeyer CreditAttribution: derjochenmeyer commentedTry using JSMIN. JSMIN+ has performance issues.
I have no explanation for a higher performance impact. The same versions of JSMIN and JSMIN+ are shipped with 6.x-1.5 and no changes to the way the minified files are built were made.
Comment #2
derjochenmeyer CreditAttribution: derjochenmeyer commentedMaybe we should throw out JSMIN+ and instead support Googles Closure Compiler as suggested here: #632704: Support for google closure compiler
Comment #3
asb CreditAttribution: asb commentedSorry for the delay, another site just died with those memory issues ;-/
Tried your suggestion, left the complete configuration untouched, just unchecked the
Use JSMin+ instead of JSMinoption, looks a lot better now.I'll re-enable JS_aggregator on the other sites and report back here in a couople of hours.
Thank you! -asb
Comment #4
basvredelingIf JSMin+ does throw up, it's pretty horrible and hard to fix. You can disable it by running this query:
replace [database] with the name of your db.
Comment #5
derjochenmeyer CreditAttribution: derjochenmeyer commentedDo we still need JSMIN+ then if its so buggy?
Comment #6
1mundus CreditAttribution: 1mundus commentedJust to say that I also had problems with JSmin+ and never got it to work properly. It would be great if you could implement google closure compiler.
Comment #7
asb CreditAttribution: asb commentedWithout JSMIN+ no problems anymore. At least I won't touch it anymore ;)
Comment #8
Wim LeersSame problem. Reported to the JSMIN+ author here: http://crisp.tweakblogs.net/blog/1856/jsmin+-version-13.html#r_72741. As you can read there, I suspect it's because JSMIN+ has never been optimized to handle large JS files (such as the one Drupal generates due to JS aggregation).
Agreed that JSMIN+ should be removed until it is proven to be able to handle large JS files.
Comment #9
Wim LeersThe author has responded:
I asked him if no work-around is possible. Let's see what his answer to that is…
Comment #10
Kiphaas7 CreditAttribution: Kiphaas7 commentedAnswer given: http://crisp.tweakblogs.net/blog/1856/jsmin+-version-13.html#r_72887
So there's hope for a fix in the (near?) future...
Comment #11
Wim LeersYep, there's hope! :)
Let's mark this as postponed for now then.
Comment #12
MustangGB CreditAttribution: MustangGB commentedRelated #780914: ran out of memory jsminplus.php
Comment #13
momper CreditAttribution: momper commentedsubscribe
Comment #14
Michsk CreditAttribution: Michsk commentedsubscribe, also interested in how this goes.
Comment #15
derjochenmeyer CreditAttribution: derjochenmeyer commentedWhy do we need JSMIN+? It seems to cause problems not solutions :)
Comment #16
Michsk CreditAttribution: Michsk commented@#15: Because it downsizes your JS dramatically. And since JS i highly used, it would be a great option.
Comment #17
derjochenmeyer CreditAttribution: derjochenmeyer commentedI didn't see a BIG difference between JSMin and JSMin+
What dimensions are we talking about?
Comment #18
MustangGB CreditAttribution: MustangGB commentedI think the summary of if it is JSMin just removes whitespace and shortens variable names
Where as JSMin+ parses the files which means you can do fancy programmatic things like removing duplicate functionality and rewriting code in optimal ways (both size and speed) like a compiler would as opposed to the human friendly readable solution
So yea, all in all code is a lot smaller and potentially faster as well
The solution to the memory exhausted problem is here: http://crisp.tweakblogs.net/blog/1665/a-new-javascript-minifier-jsmin+.h...
Comment #19
derjochenmeyer CreditAttribution: derjochenmeyer commentedNo patch to review.
Comment #20
threading_signals CreditAttribution: threading_signals commentedHave you guys tried out mod_pagespeed?
http://code.google.com/speed/page-speed/docs/using_mod.html
I've installed it, but I haven't come to a good understanding of if this is a good mod to enable or not thus far.
Comment #21
threading_signals CreditAttribution: threading_signals commentedunrelated comment in the wrong issue queue.
Comment #22
threading_signals CreditAttribution: threading_signals commentedsorry about that! need to slow down.
Comment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedsubscribing.
Comment #24
momper CreditAttribution: momper commentedComment #25
mikeytown2 CreditAttribution: mikeytown2 commentedissue is with cores jquery.form.js file. One needs to use a different file.
Alt is this new module: http://drupal.org/project/advagg
Still under heavy development but it is moving along.
Comment #26
zwoop CreditAttribution: zwoop commentedFwiw, I just upgraded ckeditor to v1.5 (from v1.4) on my site, and that started triggering these issues as well with jsmin+. I know they are not related, but someone else trying to understand why upgrading ckeditor breaks the site might find this useful. Before upgrading ckeditor, jsmin+ was not having these memory issues.
Comment #27
Kiphaas7 CreditAttribution: Kiphaas7 commentedhttp://crisp.tweakblogs.net/blog/6861/jsmin+-version-14.html
Comment #28
MustangGB CreditAttribution: MustangGB commentedOoooh exciting, thanks for posting
Comment #29
sinasalek CreditAttribution: sinasalek commentedTried #27 and i no longer see WSOD page
Comment #30
brunorios1 CreditAttribution: brunorios1 commentedsub
Comment #31
rootworkAgreed, the new version of JSMin+ fixes the WSOD issues.
Would be great to see this updated and released in a new version (or at least dev). All it takes is replacing the contents of jsminplus.php in the module with the newer version, available here (zipped):
http://files.tweakers.net/jsminplus/jsminplus.zip
If there needs to be a real patch, I can roll one, but this seems pretty straightforward...
Comment #32
Kiphaas7 CreditAttribution: Kiphaas7 commentedFYI: WSOD is still possible, because jsmin+ is memory hungry. But, given the comment of the author (crisp) that memory consumption of minifying the source of jQuery 1.6.2 (~230KB) went down from +40MB to ~8MB (factor 5 at least), this would mean that:
Taking into account Drupal's memory usage (estimated at ~10MB):
All these numbers are order of magnitudes obviously (rough estimates).
Next steps would be to:
a) identify a representative max size of unminified (!!!), uncompressed (!!!) javascript aggregrate files
b) Determine if it's still likely that jsmin+ hits a reasonable memory limit and if so, which one (32, 64 or 128MB)
c) Depending on the memory limit, decide if jsmin+ can be included again, maybe with a disclaimer/warning if a mem limit higher than 32MB is required?
Comment #33
rootworkJust noting that JSMin+ *is* currently included. If we need to do more to establish when WSODs occur before including the newest JSMin+, I'd support removing it from the module and releasing a new version without it first -- because right now, with it present, it's basically unusable.
Comment #34
Kiphaas7 CreditAttribution: Kiphaas7 commentedErr, you're right. So the maintainers can do:
a) remove jsmin+, do testing, add it back later if testing says so
b) upgrade, do testing, remove if testing says so
c) do nothing ;)
Comment #35
mikeytown2 CreditAttribution: mikeytown2 commentedIf you want js compression that uses the latest jsmin+ and testing of each file to make sure it is compressible then check out the Advanced CSS/JS Aggregation module.
Comment #36
rootworkThat's great, but let's keep this issue queue on-task: Fixing this module.
Maintainers? Thoughts?
Comment #37
derjochenmeyer CreditAttribution: derjochenmeyer commentedcommited suggestion #31.