Follow-up from #1193350: Serving unstyled pages while bundles are initially generating
Sometimes pages hang - seems to be an issue with bundle generation. There a strange errors in the watchdog sometimes, like
"This request could not generate correctly. Loop detected. Request data: sites/example.com/files/advagg_js/js_74e9b8d252b17e1f477bdeb85e93c845_0.js"
Also, there are messages like
htmlspecialchars(): Invalid multibyte sequence in argument in /var/aegir/platforms/d6_2011-06-21_045544/includes/bootstrap.inc on line 856.
which indicate that some garbage is processed with check_plain(). This could be unrelated, i'm not sure.
I tried to disable css & js compression but that didn't seem to help.

I don't know how to reliable replicate this. I know for sure that its better to start in clean state (empty tables, no bundle files) and to browse different pages.

Comments

crea’s picture

Title: Varios bundle generation issues (redirects, loops, hanging pages etc) » Various bundle generation issues (redirects, loops, hanging pages etc)
Peter Bowey’s picture

StatusFileSize
new72.01 KB
new73.11 KB

Some *basic* advagg 'benchmarking'...

I performed a advagg build test with cold data / caches (no data aggregates):
Here is the .jpg snapshot: (see: http://drupal.org/files/advagg-building.jpg )

I then did the same benchmark 'after' advagg had complete aggregate builds:
(see: http://drupal.org/files/advagg-cache.jpg )

Just for those so 'curious minded' ... :)

Note: The Linux Server I use was at a 'cold start' for this test, with all caches near 'non-existent'.
I forced total deletion of all advagg's aggregate store at both local /files/advagg_css + /files/advagg_js. I also purged all stored cache assets at my edgecast 'PULL' CDN.

I will point out that I did not manually run the advagg admin GUI 'build, I simply allowed the first 'cold' client HTTP request to 'kick' the advagg 1st time 'build' process.

Test Values Set/ Used:
1) Typical D6 home page: http://www.peterbowey.com.au with about 45 active modules (12 = 3rd' party)
2) Purged Drupal MySQL cached entries (mainly advagg 'bundles' + 'files')
3) Memcached Daemon + Memcache D6 = 'empty'
4) Nginx 'Upstream' pools = 'cold start' (PHP-FPM FastCGI)
5) CDN (pull) = Purged
6) Advanced CSS/JS Aggregation Settings: Compress CSS Files, Compress Inline CSS, Compress JS Files, Compress Inline JS
7) Client End = COLD for each /GET test (no HTTP is 304 possible) eg; NO caching - not a F5 'refresh'!

In numbers:
1) Cold Build test: 11.4 seconds until HTTP client 'start render' (home page site)
2) Asset Avail State test: 1.78 seconds until HTTP client 'start render' (home page site)

Linux / PHP / Drupal Error State Logs: 'None'

For those wishing to be on the same bench-test site, see: http://www.webpagetest.org/

mikeytown2’s picture

multibyte issue is with core #837322: htmlspecialchars - Invalid multibyte sequence in argument I'll see if I can work around it when outputting the debug info. Code below is used to output the debug info. Open to ideas on how to format the print_r better.

    $data = str_replace('    ', '    ', nl2br(htmlentities(print_r($data, TRUE))));
    watchdog('advagg', 'Debug info: !data', array('!data' => $data), WATCHDOG_DEBUG);
Peter Bowey’s picture

There may also be a multibyte issue using the PHP PECL JSMin+ (faster C Version), see:
http://www.ypass.net/blog/2009/06/really-fast-javascript-minify-in-php/#...

mikeytown2’s picture

@crea
Next time you get an error like this
"This request could not generate correctly. Loop detected. Request data: sites/example.com/files/advagg_js/js_74e9b8d252b17e1f477bdeb85e93c845_0.js" can you add ?advagg-debug=1 to the url and get the debug output?

crea’s picture

Ok

mikeytown2’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new649 bytes

Here's a shot in the dark for the debug code. Let me know if this fixes the issues with Invalid multibyte sequence in argument

mikeytown2’s picture

Status: Needs review » Postponed (maintainer needs more info)

committed the patch above.

Postponed this issue until feedback is given.

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Going to close this issue

crea’s picture

Sorry Mike. Didn't have time for this