Logged PHP 5.x E' Notices captured on clean Drupal D6 (Pressflow) Install:
Notes: at this point no other modules but latest CORE, View and CCK
Prior to installing latest [advagg] no other PHP E' Notices had occurred over 2 hours:
Notice: Undefined offset: 1 in drupal_http_request() (line 556 of /var/www/virtual/peterbowey.com.au/includes/common.inc).
Notice: Undefined offset: 2 in drupal_http_request() (line 559 of /var/www/virtual/peterbowey.com.au/includes/common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 559 of /var/www/virtual/peterbowey.com.au/includes/common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 556 of /var/www/virtual/peterbowey.com.au/includes/common.inc).
Notice: Undefined offset: 2 in drupal_http_request() (line 559 of /var/www/virtual/peterbowey.com.au/includes/common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 559 of /var/www/virtual/peterbowey.com.au/includes/common.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | tests.jpg | 147.71 KB | Peter Bowey |
| #19 | advagg-1160204-18.patch | 443 bytes | mikeytown2 |
| #15 | advagg-1160204-14.patch | 9.43 KB | mikeytown2 |
Comments
Comment #1
Peter Bowey commentedI suspect (tracing sample code) that this problem has been introduced by the new inline JS code in;
advagg_js_compress/advagg_js_compress.module:
Comment #2
Peter Bowey commentedSame D6 'clean install' - with [advagg].
Went to admin/settings/advagg page and got this report:
Comment #3
Peter Bowey commented3# - Changed the [advagg] "IP Address to send all asynchronous requests to:" to -1 and applied!
Got this report:
Comment #4
Peter Bowey commented4# switched to [advagg] admin/settings/advagg/bundler url and got this report:
Comment #5
mikeytown2 commentedWhat does your the site status message say in regards to advagg? These errors are a by-product of the async worker timing out before it sends a message back. Nothing to really worry about and the fix for this would slow it down quite a bit so I'm tempted to mark this as a won't fix. I should create a patch for pressflow/drupal to "fix" this issue and not have to slow it down... the other option is to backport the D7 drupal_http_request and use that if your using php5... which sounds like a good idea.
Comment #6
Peter Bowey commentedChecked my [nginx] server logs - after the above. Found this logged report:
Comment #7
Peter Bowey commentedRequested 'status message say in regards to advagg'
Comment #8
Peter Bowey commented#8 - Also found a code bug in [advagg_bundler.admin.inc]
Comment #9
Peter Bowey commentedThe code 'idea' to use backport the D7 drupal_http_request is a great idea!
Seems we are battling' between D6 and D7, with the 'really' patient ones are waiting for D8 (ha!)
I am likely to hack-core the D6 with this ->
Comment #10
Peter Bowey commented#10 - Other logged errors noted (since clean install of advagg):
Comment #11
Peter Bowey commentedTotally clean Pressflow install with barebones [core + views + cck]:
Changes made to [advagg] were:
ONE:
TWO:
With these two changes - I had no PHP 5.x E' notices, with all the same tests as above.
The only last issue is the slow 'async worker'!!! Give it time, and it finally gets 'out of its 'lazy bed' and walks 'slowly' to the kitchen for a coffee treat?? Duh
Comment #12
Peter Bowey commentedAfter the 'above' changes the only 'serious bug' logs I get are these: (advagg)
Comment #13
mikeytown2 commentedLooks like the D7 backport isn't exactly what I want... this is closer to my needs
http://hi.baidu.com/%C3%C6%C9%F9%B7%A2%B4%F3%B2%C6/blog/item/26ac9bdd226...
Comment #14
Peter Bowey commentedJust installed the new [advagg] (latest .git).
I get this report just after module activation:
I then 'reports' as above consistently in use.
Comment #15
mikeytown2 commentedHere is the patch that I've committed. I'm going to assume this fixes the issue, let me know if nginx spits out any errors; I might have a workaround for it.
Comment #16
mikeytown2 commented@#14 that's a very strange error to get; here is the code in question
I SELECT filename, filetype and then use it in the row... if anything it should throw a SQL error.
EDIT: I see the error... stand by
Comment #17
Peter Bowey commentedJust tried the above 'patch', 'after a clear cache event' - it looks good (no E' events logged)!
Went through all the usual events that prev. triggered the log - but is good.
Comment #18
Peter Bowey commentedTo #16 'EDIT: I see the error... stand by...'
I am one patch behind - already!
I had just done #15 (patch) :)
Comment #19
mikeytown2 commentedcommitted this patch for #14 :)
Comment #20
mikeytown2 commentedEnded up changing that last patch; like this better:
http://drupalcode.org/project/advagg.git/commitdiff/817db3183af2ba863a64...
Snapshot download of the latest
http://drupalcode.org/project/advagg.git/snapshot/817db3183af2ba863a64de...
Comment #21
Peter Bowey commented#19 Patch works a treat, I see clean logs after several event tests! = Yay!!
Well done... :)
Comment #22
Peter Bowey commentedTo #20, I will try that later when it hits -> "git clone --branch 6.x-1.x http://git.drupal.org/project/advagg.git"
I must get a life :)
Comment #23
Peter Bowey commentedReferring back to #12 - #13, I can see now why Wim Leers wrote his advanced aggregation / compressor in Perl!
Comment #24
Peter Bowey commentedI have just done some hard testing, 'rebuilding aggregated files' etc..
I note that the build loop sometimes 'hangs'
Comment #25
Peter Bowey commentedOut of interest, this is how it currently appears at: http://www.webpagetest.org/result/110518_NG_MGX2/2/details/
Keeping in mind that [boost], [cdn] and [memcache] are NOT active (yet).
Comment #26
mikeytown2 commentedin terms of a redirect loop I have an idea on how they might be caused
#1160890: Create uncompressed aggregate and then overwrite and save the compressed version.
Comment #27
Peter Bowey commented'Sounds good'. Yes, I have JSMin+ statically compiled [not with pecl] into PHP-FPM.
Is [advagg] using PHP's [internal] CSSTidy and what advantage is it over some good 'regex' trimming?
Comment #28
Peter Bowey commentedRefer #26
Have you seen this -> http://www.if-not-true-then-false.com/2009/css-compression-with-own-php-...
Comment #29
Peter Bowey commentedI note this 'comment' on the Drupal CSSTidy module project page:
Comment #30
Peter Bowey commentedI am seriously thinking of 'patching' advagg's current "
function advagg_css_compress_css_tidy(&$contents)" to disable/bypass CSSTidy class.
This article made me think about this CSS event:
http://nadeausoftware.com/articles/2008/06/dont_bother_using_css_optimiz...
Thoughts?
Comment #31
mikeytown2 commentedJust disable the compression module... simple as that. You still get core's regex whitespace compression.
Comment #32
mikeytown2 commentedhttps://bugs.launchpad.net/pressflow/+bug/597718
file_create_url() would be an issue with the creation of the link in the HTML. It appears the reference to the CSS is correctly set, so this is something else.
Comment #33
Peter Bowey commentedThanks Mike,
Of interest, I replaced advagg's CSSTidy function in [advagg_css_compress.module] with this 'regex' code, and 'finally' the [Recreate all aggregated files] option actually completes (and without timeouts)....
With CSSTidy, I 'gave up' waiting for the completion of 'Recreate all aggregated files'.
No logged events either - with the simple regex (above).
So yes, CSSTidy is heavy hauling...
Comment #34
Peter Bowey commented#33 Regex method benchmarks at 8 seconds [Recreate all aggregated files]
Best case CSSTidy trials varied from 3 minutes to 'never completes' :)
Comment #35
Peter Bowey commentedI then tried this 'new' PHP class method -> http://www.codenothing.com/archives/php/css-compressor/
This new code (replacing the CSSTidy Class used in advagg) bench-marked at 10 seconds.
I used 'sane' for the CSS optimize [css-compressor 3.0]
Cool
Comment #36
mikeytown2 commentedThanks for the heads up on that; it is MIT Licensed so I can include in the advagg download; which is something I plan on doing.
#1161870: Include the CSS Compressor
Comment #37
mikeytown2 commented