Noticed this on my status page today
How do I begin to debug this?
Thanks

jQuery UI CSS should be coming from a CDN.
Error Adv CSS/JS Agg - HTTP Request HTTP requests to advagg for js files are not getting though.
Error Adv CSS/JS Agg - HTTP Request HTTP requests to advagg for css files are not getting though.
Adv JS CDN
jQUery & jQuery UI JS should be coming from a CDN.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

I've committed this patch which will output more info when this error happens. Could you copy the Raw request info as a reply to this issue?

jwaxman’s picture

Thanks.
Here's the output on the status page.
Any other information needed?

Adv CSS/JS Agg - HTTP Request	HTTP requests to advagg for js files are not getting though.
Raw request info:
stdClass Object
(
    [request] => GET /sites/default/files/advagg_js/js1364312251.js HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: www.ophed.com


    [code] => -1
    [error] => request timed out
)
Error
Adv CSS/JS Agg - HTTP Request	HTTP requests to advagg for css files are not getting though.
Raw request info:
stdClass Object
(
    [request] => GET /sites/default/files/advagg_css/css1364312251.css HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: www.ophed.com


    [code] => -1
    [error] => request timed out
)
mikeytown2’s picture

Status: Active » Fixed
FileSize
992 bytes

Looks like your server is taking longer than 3 seconds to respond to the http request. I've upped the limit to 10 seconds now. This patch has been committed.

jwaxman’s picture

Thanks.
Anything I can do about that short of moving to a different host?

mikeytown2’s picture

See what needs to happen in order to reduce your bootstrap time. The advagg 404 code path is pretty short so I would look at profiling your site and seeing whats causing the 3+ second bootstrap times.

jwaxman’s picture

Once again, thanks.
I know that this next question is outside the scope of advagg but ..
When I googled around using combinations of "drupal" "bootstrap" "profile" and "performance" and didn't come up with anything useful.
Can you point me toward a resource that would let me see what's slowing the bootstrap down?

mikeytown2’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rinku_talukdar’s picture

Component: CSS Compression » Code
Priority: Normal » Critical
Status: Closed (fixed) » Active

I am using ngnix and advagg. And also added in nginx cong
###
### advagg_css and advagg_js support
###
location ~* files/advagg_(?:css|js)/ {
access_log off;
expires max;
add_header ETag "";
add_header Cache-Control "max-age=290304000, no-transform, public";
add_header Last-Modified "Wed, 20 Jan 1988 04:20:42 GMT";
try_files $uri @drupal;
}

Still getting the following error in status report issue-

Adv CSS/JS Agg - HTTP Request HTTP requests to advagg for js files are not getting through.
Raw request info:

stdClass Object
(
[request] => GET /sites/localtest.org/files/advagg_js/js1371201780.js HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: d7local.artofliving.org

[data] =>
404 Not Found


404 Not Found


nginx/1.1.19

[protocol] => HTTP/1.1
[status_message] => Not Found
[headers] => Array
(
[server] => nginx/1.1.19
[date] => Fri, 14 Jun 2013 09:23:01 GMT
[content-type] => text/html
[content-length] => 169
[connection] => close
)

[code] => 404
[error] => Not Found
)

Error
Adv CSS/JS Agg - HTTP Request HTTP requests to advagg for css files are not getting through.
Raw request info:

stdClass Object
(
[request] => GET /sites/localtest.org/files/advagg_css/css1371201780.css HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: d7local.artofliving.org

[data] =>
404 Not Found


404 Not Found


nginx/1.1.19

[protocol] => HTTP/1.1
[status_message] => Not Found
[headers] => Array
(
[server] => nginx/1.1.19
[date] => Fri, 14 Jun 2013 09:23:01 GMT
[content-type] => text/html
[content-length] => 169
[connection] => close
)

[code] => 404
[error] => Not Found
)

mikeytown2’s picture

@rinku_talukdar
According to the log you just posted, nginx is handling the 404 instead of drupal. I would check the nginx configuration; it appears that the advagg dir is located in sites/localtest.org/files/ but in nginx you have it configured for files/. Address this issue and it should work.

mikeytown2’s picture

Status: Active » Closed (fixed)

Going to mark this as fixed. Assuming that rinku_talukdar got this working as I haven't received any feedback.

ArtActivator.com’s picture

The problem is in underscore. Status report page asking for css1212121.css and js1231231231.js
but in nginx config it is:
location ~* /sites/default/files/advagg_js/js_*[[:alnum:]]+.js$ {

so the fix is:
location ~* /sites/default/files/advagg_js/js[_]*[[:alnum:]]+.js$ {
location ~* /sites/default/files/advagg_css/css[_]*[[:alnum:]]+.css$ {

For nginx I would recommend to use this nginx config
https://github.com/perusio/drupal-with-nginx
but it also need to be edited to fix this issue.

-------------------------
www.ArtActivator.com - Order your success!

mikeytown2’s picture

Category: bug » task
Priority: Critical » Normal
Status: Closed (fixed) » Needs work

I'll add in the underscores to the test file & document this better. Thanks for investigating this :)

mikeytown2’s picture

Status: Needs work » Fixed
FileSize
582 bytes

Following patch has been committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sibiru’s picture

Hi, I solved the problem on nginx perusio conf change _ to __ on these lines (78 & 90 )

.........
 location ~* /sites/default/files/advagg_css/css_[[:alnum:]]+\.css$ {
......
location ~* /sites/default/files/advagg_js/js_[[:alnum:]]+\.js$ {
........

to

.........
 location ~* /sites/default/files/advagg_css/css__[[:alnum:]]+\.css$ {
......
location ~* /sites/default/files/advagg_js/js__[[:alnum:]]+\.js$ {
........
RaulMuroc’s picture

Issue summary: View changes

The same kind of error raises with latest stable version due to a configuration of .htaccess + .htpassword restriction. Then it returns [error] => authentication required.

Just extra information for those who could face the same problem.

uhlvuhlv’s picture

In my case as I'm working locally, I fix it by changing the baseurl in the settings file:

$base_url = 'http://www.mysite.com';

to:

$base_url = 'http://localhost';
Bandy’s picture

I also had such a problem in the interaction with nginx. The solution for me:

### advagg_css and advagg_js support
location ~* files/advagg_(?:css|js)/ {
access_log off;
expires max;
add_header ETag "";
add_header Cache-Control "max-age=2628000, no-transform, public";
try_files $uri $uri/ @rewrites;
#try_files $uri @drupal;
}

Since everything is fine. Maybe it will help others as well.

mikeytown2’s picture

Following patch has been committed based off of #19

jason.fisher’s picture

FYI, for those of you that are using this rule, it is still not quite complete:

.........
 location ~* /sites/default/files/advagg_css/css__[[:alnum:]]+\.css$ {
......
location ~* /sites/default/files/advagg_js/js__[[:alnum:]]+\.js$ {
........

There are hyphens and underscores that appear in the filename also. Try:

location ~* /sites/default/files/advagg_css/css__[[:alnum:]-_]+\.css$ {
..
location ~* /sites/default/files/advagg_js/js__[[:alnum:]-_]+\.js$ {
..

.. or use the committed rule that was provided in #19.

labboy0276’s picture

Side note on this closed issue (sorry to comment on it), but I had a similar issue with Pantheon and Fast 404 being enabled. Since we can't edit the nginx config, the best way to handle this is to remove css|js from $conf['404_fast_paths']. This fixes the error on Pantheon with fast 404s enabled.

Sample $conf['404_fast_paths'] for those who just like to copy and paste:

$conf['404_fast_paths'] = '/^(postnuke|wp-content|mailman|phpBB)|\.(?:txt|png|gif|jpe?g|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
mikeytown2’s picture

Instead of changing the 404_fast_paths variable, change the 404_fast_paths_exclude variable from
$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
to
$conf['404_fast_paths_exclude'] = '/\/(?:styles|advagg_(cs|j)s)\//';

The status report should highlight this.

mikeytown2’s picture

Status: Closed (fixed) » Active

Looks like I need to give a better code example based off of feedback from http://drupal.stackexchange.com/questions/180735/error-adv-css-js-agg-fa...

I referenced this in the last comment but it never happened. Reopening to make sure this happens.

  • mikeytown2 committed 958f6a1 on 7.x-2.x
    Issue #1951180 by mikeytown2: Give advice on non default...
mikeytown2’s picture

Status: Active » Fixed
FileSize
1.94 KB

Code now handles non default 404_fast_paths_exclude variable setting.

  • mikeytown2 committed 105a876 on 8.x-2.x
    Issue #1951180 by mikeytown2: Increase HTTP timout.
    
  • mikeytown2 committed e203852 on 8.x-2.x
    Issue #1951180 by mikeytown2: output full request object on error.
    
  • mikeytown2 committed a30e6f5 on 8.x-2.x
    Issue #1951180 by mikeytown2: Update nginx documentation.
    
  • mikeytown2 committed e6dd648 on 8.x-2.x
    Issue #1951180 by ArtActivator.com, mikeytown2: Add space to 404 test...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gopisathya’s picture

I also get the same issue. Well, there are some suggestions to resolve this but what does it really mean? What advagg is trying to do and what is wrong?

webservant316’s picture

I woke up to this error this morning. Running Drupal 7.56 and AdvAgg 7.x-2.25 and also using Cloudflare.

What are my steps to debug and fix this?

Also I did this

In some cases this can sometimes be a false report; go here: ..../files/advagg_css/css__1499945620.css and check if the source (press ctrl+u on your keyboard) has an html comment that says "advagg_missing_fast404"; if it does, this is a false report, add this $conf['advagg_skip_404_check'] = TRUE; to your settings.php file.

I did this and the string "advagg_missing_fast404" is NOT present.

Also my current configuration had been running successfully for weeks, so perhaps something changed at Cloudflare?

Opened a new issue at https://www.drupal.org/node/2894536.