From 63e1181294dc9b68761ffd57c25245743a83f1a9 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Mon, 29 Jun 2020 09:47:58 -0500 Subject: [PATCH] Add an enhanced debug configuration technique to caching guide We often have operators ask why cache logging isn't included in their logs despite setting `keystone.conf [DEFAULT] debug=True`. This is because cache logging requires additional configuration that isn't obvious unless your familiar with oslo.cache and dogpile already. This commit adds a section to the caching guide that shows people how to update their configuration files when they need to debug caching issues. Change-Id: I33d37366ea9caf320f3738db637dea7386ff6448 --- doc/source/admin/caching-layer.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/source/admin/caching-layer.inc b/doc/source/admin/caching-layer.inc index 4d53df466d..43f0db045c 100644 --- a/doc/source/admin/caching-layer.inc +++ b/doc/source/admin/caching-layer.inc @@ -201,3 +201,23 @@ The following example shows how to configure the memcached back end: You need to specify the URL to reach the ``memcached`` instance with the ``backend_argument`` parameter. + +Verbose cache logging +--------------------- + +We do not recommend using verbose cache logging by default in production +systems since it's extremely noisy. However, you may need to debug cache +issues. One way to see how keystone is interacting with a cache backend is to +enhance logging. The following configuration will aggregate oslo and dogpile +logs into keystone's log file with increased verbosity: + +.. code-block:: ini + + [DEFAULT] + default_log_levels = oslo.cache=DEBUG,dogpile.core.dogpile=DEBUG + + [cache] + debug_cache_backend = True + +These logs will include cache hits and misses, making it easier to diagnose +cache configuration and connectivity issues.