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
Issue fork acquia_purge-3241542
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
Comment #2
jmester13 commentedAlso 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?
Comment #3
loopy1492 commentedWe are getting this with webform submission lists.
Comment #4
natefollmer commentedAny 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.
Comment #5
plarson commentedI'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?
Comment #6
plarson commentedWe 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?
Comment #7
damondt commentedGiven 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?
Comment #9
steven jones commentedWe'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.
Comment #10
steven jones commentedI've raised the issue on purge module: #3533998: Purge module TagInvalidation allows spaces
Comment #12
steven jones commentedWe have a MR, probably needs some review.