Issue
When activating content in your AEM site, the changes show on the publish instances, but not on the actual website.
There can be many causes for thidepending on the architecture it varies. The causes can be:
- If you are using a CDN
- Incorrect TTL settings
- Wrong or missing cache-related headers (Cache-Control, Pragma Expires)
- The dispatcher or webserver is failing or misconfigured
The first step in debugging such an issue is to isolate the problem. We already know that the AEM publish instances are getting updated with the activations. So the issue must reside in the upstream web stack including CDN and Web Server / Dispatcher cache.
I. Check the Web Servers / Dispatchers to see if the content is outdated
- Test bypassing the dispatcher by adding a querystring in the URL, for example http://dispatcher-host1/content/geometrixx/en.html?bypasscache=1. Check the cache-related headers for this response too. The headers can differ between the ones returned from a cached response. Note that after a dispatcher cache flush, the first HTTP response would be the same as when bypassing dispatcher. Due to this, some CDN edge servers would be receiving the bypassed response and others would be getting the cached response from dispatcher.
Note:
If cache-related headers are omitted from the HTTP response, then some CDNs such as Amazon Cloudfront will cache the response indefinitely (assuming no TTLs are set).
III. Flush Agent blocked or not configured
If you have determined the issue is not at the CDN level, then the next step is to check the AEM flush agent configurations.
Make sure that you have configured flush agents and that they are enabled
Check the flush agent queues if the cache flush jobs are getting processed or stuck in queue.
- 1. Flush agent is in blocked state If the dispatcher flush agent page shows blocked state then there might be a network connectivity issue between AEM and the dispatcher server(s). Make sure that all the AEM instances with flush agents configured can reach the dispatcher servers. Modify firewall rules if required to allow connectivity between the servers.
TEST A MANUAL DISPATCHER FLUSH REQUEST USING CURL
Test out a dispatcher flush request using cURL. If you get anything other than a 200 response with response body "OK", then the dispatcher flush is not being processed by the dispatcher module. Follow the steps below to debug it.12345curl -
v
-H
"CQ-Action: Activate"
\
-H
"CQ-Handle: /content/bar"
\
-H
"Content-Length: 0"
\
-H
"Content-Type: application/octet-stream"
\
http:
//dispatcher-server-hostname
:port
/dispatcher/invalidate
.cache
See the Microsoft documentation for further information on how to access and modify these configurations.
B. Check IIS Rewrite Rules
See the Microsoft documentation for further information on how to access and modify these configurations.
Apache Web Server:
A. Check the RewriteRule configurations
Review and RewriteRule directives in your httpd configurations to validate if any could block or break GET or POST requests to /dispatcher/invalidate.cache
No comments:
Post a Comment
If you have any doubts or questions, please let us know.