Problem/Motivation

We got down time recently on Acquia cloud. Our log file showed that if there is a white space at the end of cache tag, it will cause endless re-trying and finally hammer the services down.

The log will be full of lines like this
Tag 'redirect_path:xxxxx ' contains a space, this is forbidden. request_id="yyyyyy"

Steps to reproduce

On Acquia cloud, use https://www.drupal.org/project/domain_path_redirect 8.x-1.3 which haven't apply this patch https://www.drupal.org/project/domain_path_redirect/issues/3241344 and allow path end with white spaces.

Wait acquia_purge to be triggered and check the drupal-watchdog log and php-errors

Proposed resolution

validate the cache tag key in acquia_purge before send the request.
validate the cache tag key on the service side

Ideally, both side should handle the key properly, but we can't touch the service side.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

shenzhuxi created an issue. See original summary.

jmester13’s picture

Also experiencing this issue, I'm not using domain path redirect however. In my case it is one view causing the error.

purger_acquia_purge_HASH: Tag 'config:views.view.View Name' contains a space, this is forbidden.

Is there some way to edit the cache tag manually?

loopy1492’s picture

We are getting this with webform submission lists.

natefollmer’s picture

Any update on this? I'm getting this error in some site studio font settings and can't find anywhere in site studio to change the machine name to remove the space.

plarson’s picture

I'm also experiencing this. We may have added a space when editing the title field and then realized the mistake and fixed it, but the tag remains. How do we delete a tag with a space?

plarson’s picture

We really need a way to prevent this from happening, but if it does happen, how do we get rid of it other than emptying the entire queue?

damondt’s picture

Given the amount of time this has been open I wonder if the maintainers would prefer we open a ticket for site studio to remove the space?

steven jones made their first commit to this issue’s fork.

steven jones’s picture

We're seeing this issue too. I feel like this could be handled upstream by the purger module, because if cache tags are never supposed to contain spaces, why is it passing them on to the purger plugins in the first place?

Anyway, we are where we are, and I might make a patch to put a band-aid on the issue by silently ignoring the tags with spaces, or splitting on space, and invalidating those tags, because that's presumably how they are being treated by some parts of the system.

steven jones’s picture

I've raised the issue on purge module: #3533998: Purge module TagInvalidation allows spaces

steven jones’s picture

Status: Active » Needs review

We have a MR, probably needs some review.

rajeshreeputra made their first commit to this issue’s fork.