Trying to make sure Advagg bundler spits out two equal size CSS bundles as it makes a massive difference in initial server response time.

For some reason, Advagg will split files into 2 bundles (first one 4kb and second one 36kb).

On Dev server, it works perfectly with same settings. Both identical systems.

I have tried uninstalling/re-installing a few times with no luck.

On production site, it shows 88 groupings. On dev server (where everything works fine), it is showing 150 groupings.

I have spent hours and hours with no luck.


It appears that on production site, Advagg is trying to put all the system files or those added by modules in one file and theme CSS files in the second aggregate file. It then loads system CSS files aggregate first which becomes render blocking for the theme CSS files hence 4kb first file blocking 36kb second file.

This is not the intended functionality. Bundler logic allows for aggregation based on size or number of files.

How can I debug/fix this?

  • 2
    What is the question? Only you can tell us the differences between your dev platform—where I think you are saying this works as expected—and your production platform.
    – mona lisa
    Feb 26, 2023 at 22:22
  • 3
    This is not a forum. It is a question-and-answer site: drupal.stackexchange.com/tour What I meant was “you haven’t asked a question”.
    – mona lisa
    Feb 27, 2023 at 1:44
  • 2
    The only question is "How can I debug/fix this?" for something that is rather vague without much of a clear answer. It sounds like a module bug or question that should be posted in that module queue for better direction.
    – Kevin
    Feb 27, 2023 at 2:19
  • 2
    It's a Q&A site, it's really hard to provide a direct answer "how do I debug this?". Generally these things are better spotted or known by contrib module maintainers.
    – Kevin
    Feb 27, 2023 at 3:09

1 Answer 1


It appears that the only option is to add template CSS via drupal_add_js and give it a higher priority so that aggregates have similar sizes.

This is the code I added to template.php to get some files included in the aggregate.

  // loading font awesome separately to get it into aggregates

drupal_add_css(drupal_get_path('theme', 'mytheme') . '/font-awesome/css/font-awesome.min.css');

This is obviously not a solution but just a workaround the issue.


Disabling and enabling the base theme fixed the issue in entirety. Apparently just clearing the theme registry wasn't enough.

Hope this helps someone else with same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.