On one site we had to disable advagg for... what turned out to be problems that weren't advagg's fault, so we're turning it back on again ;) One sporadic problem we've seen (three or four times over five months) with core's aggregation is that an aggregated file will become corrupted somehow, and we've had to push out a minuscule whitespace change to one of the files in the aggregate to make it create a new file. For those once-in-a-year (or four times in a year) situations where an aggregate file is corrupted, might there be an easy way to force the file to be regenerated with a new filename so that browsers are then instructed to load the new file, instead of use the corrupted older one? Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna created an issue. See original summary.

mikeytown2’s picture

Might be related to these issues:
#2717719: CSS/JS change not pushed out after smart cache flush with dirty apache shutdown
#2451801-28: Empty JS on multilingual's default language pages; sometimes binary (gzip) or 504 as well. 307 issue.

Thinking that the dirty shutdown might be the cause, and clearing mtimes might be the cure. If not I can add the change counter inside of the files table to the second hash; not including it if the shared multisite setting is enabled.

logickal’s picture

My intitial thought was that adding the timestamp of generation to one of the hashes would also work...

logickal’s picture

Simple patch adding the timestamp to the aggregate file generation. Untested at this point, but just putting the idea out there.

mikeytown2’s picture

Status: Active » Needs review
mikeytown2’s picture

There are 3 hashes in an advagg filename.
- First is the list of files, this can't be adjusted.
- Second is the contents of the file, this is what you've been changing by doing a whitespace change; also what the patch in #4 does.
- Third is the advagg settings, incrementing the global counter (on the operations page) is one way to force out a change without changing a file; this just forces every aggregate to be regenerated as a result (big hammer).

What if we used the changes column in the advagg_files table as part of the second hash; I've never been a fan of using timestamps as part of the hash. On the operations page I could make a per file forced change ui; similar to the info page. I'll make this available if the Unified Multisite setting is not being used (a way to share aggregates across multisites if all settings match).

mikeytown2’s picture

Status: Needs review » Active

Does the big hammer work for you guys or do you need something else? The patch in #4 will most likely be rejected, seems like it will create a lot of files; passes tests though.

DamienMcKenna’s picture

We unfortunately had to stop using advagg, so we leave it up to you.

mikeytown2’s picture

@DamienMcKenna
Any feedback as to why?

mikeytown2’s picture

Status: Active » Postponed (maintainer needs more info)

Is this still desired?

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Closing due to lack of feedback. Please reopen if something like this is still needed.