Troubleshooting tips for the dynamic cache service
The dynamic cache service works within an application server Java™ virtual machine (JVM), intercepting calls to cacheable objects.
Servlets are not cached
Recommended response |
---|
Enable servlet caching. On the web container settings page of the administrative console, select the Enable servlet caching check box. |
Cache entries are not written to disk
Explanation | Recommended response |
---|---|
Cache entries are written to disk when the cache is full and new entries are added to the memory cache. Cache entries also are written to disk when Flush to disk is enabled in the administrative console and the server is stopped. | Verify that Disk offload is enabled on the Dynamic cache service settings page of the administrative console. Also verify that cache entries written to disk are serializable and do not have the PersistToDisk configuration set to false. |
Some servlets are not replicated or written to disk
Recommended response |
---|
Ensure that the attributes and response are serializable. If you do not want to store the
attributes, use the following property in your cache
policy:<property name="save-attributes">false</property> |
Dynamic cache service does not cache fragments on the Edge
Recommended response |
---|
Set the EdgeCacheable property to true in the cache policy for those
entries that are to be cached on the
Edge.<property name="EdgeCacheable">true</property> |
Dynamic cache invalidations are not sent to the IBM HTTP Server plug-in
Explanation | Recommended response |
---|---|
The DynaCacheEsi.ear file is required to send invalidations to external caches. | Install the DynaCacheEsi.ear file using the administrative console. |
Cache entries are evicted often
Problem | Explanation | Recommended response |
---|---|---|
The cache is full and new entries are added to the cache. | Cache entries are evicted when the cache is full and new entries are added to the cache. A least recently used (LRU) eviction mechanism removes the least recently used entry to make space for the new entries. | Enable Disk offload on the Dynamic cache service settings page of the administrative console so the entries are written to disk. You can also increase the cache size to accommodate more entries in the cache. |
Cache entries in disk with timeout set to 0 expire after one day
Explanation | Recommended response |
---|---|
The maximum lifetime of an entry in disk cache is 24 hours. A timeout of 0 in the cache policy configures these entries to stay in disk cache for one whole day, unless they are evicted earlier. | Set the timeout for the cache policy to a number less than 0. |
Unable to monitor cache entries on the Edge
Explanation | Recommended response |
---|---|
Use the dynamic cache monitor to monitor the contents of the memory cache, disk cache and external caches, like the Edge cache. For the ESI processor's cache to be visible in the cache monitor, the DynaCacheEsi.ear application must be installed and the esiInvalidationMonitor property must be set to true in the plugin-cfg.xml file. |
Set the esiInvalidationMonitor property in the plugin-cfg.xml file to true. Refer to the Displaying cache information article for more information about monitoring dynamic cache service activity. |
Fine tune cache for my environment
Recommended response |
---|
Use the Tivoli® Performance viewer to study the caching behavior for your applications. Also consider
performing the following actions:
|
Cleaning the disk cache files after installing the fix pack or a new release
Symptom | Problem | Recommended response |
---|---|---|
If the server is configured to use the disk cache, you must delete the disk cache files because the disk cache files are not compatible to the previous version. | Failure to remove the old disk cache files results in a ClassCastException error in the
systemerr.log file when you access the cache from the disk. Note: This topic references one or more of the application server log files. As a
recommended alternative, you can configure the server to use the High Performance Extensible Logging
(HPEL) log and trace infrastructure instead of using SystemOut.log ,
SystemErr.log, trace.log, and
activity.log files on distributed and IBM®
i systems. You can also use HPEL in conjunction with your native z/OS® logging facilities. If you are using HPEL, you can access all of your log and trace
information using the LogViewer command-line tool from your server profile bin directory. See the
information about using HPEL to troubleshoot applications for more information on using HPEL.
|
To delete the disk cache, perform the following steps:
|
Setting the flush attribute to true on every <jsp:include> tag in the cacheable JavaServer Pages file
Ensure you set the flush attribute to true on every <jsp:include> tag in the cacheable JavaServer Pages file
Symptom | Problem | Description | Recommended response |
---|---|---|---|
When you obtain the JavaServer Pages (JSP) file from the dynamic cache, a part of the page is not displayed. | The flush attribute is set to false on the <jsp: include> tag in the JSP file. | When the cacheable JSP file includes another JSP file and if the flush attribute is set to false on the <jsp: include> tag, any data written to the parent output stream prior to the<jsp: include> tag are not cached. | Set flush=true on every <jsp: include> tag in the cacheable JSP file. |
![[z/OS]](../images/ngzos.gif)
File system I/O activity when the application server is idle
Symptom | Explanation | Possible response | Recommended response |
---|---|---|---|
You experience file system I/O activity when the application server is idle. WebSphere Application Server is polling the Hierarchical File System (HFS) for the cachespec.xml file, even when there are no cache policies defined. | Dynamic cache queries the file system every 30 seconds to check for updates to the cache policy file. By checking for cache policy file updates, dynamic cache can automatically update any changed cache policies. | The dynamic cache is enabled by default because several system components rely on it for performance reasons. You can disable the dynamic cache service by using a wsadmin script or through the administrative console. Refer to the Using the dynamic cache service topic for more information about enabling the dynamic cache service. CAUTION: By disabling dynamic cache you might experience slower performance of security
because it uses the distributed map functionality of the dynamic cache service.
|
Set flush=true on every <jsp: include> tag in the cacheable JSP file. |
Dynamic cache limitation when using the JSTL <c:import> tag to include a fragment
Problem | Description | Recommended response |
---|---|---|
When a cacheable fragment is included using the JavaServer Pages Standard Tag Library (JSTL) <c:import> tag, part of the page content disappears and part of the page content displays twice on a cache hit. | Dynamic cache relies on flushing the content prior to and after including a fragment so
that the parent content preceding the include is not lost, and also to prevent pulling the child
content into the parent fragment. However, in the case of the JSTL <c:import> tag, the flush=true attribute, which flushes the parent writer prior to the child fragment is actually invoked, is not supported. Also, JSTL buffers the responses, so that the child writer is not flushed following the child fragment is done. Subsequently, the child response is pulled into the parent. Restriction:
Dynamic cache will return
multiple include statements when the JSTL <c:import> tag is used in a cached
JavaServer Pages (JSP) file. |
To avoid this problem, surround the <c:import> statement with
out.flush method statements as follows:
|
Service integration bus messages are repeated
The service integration bus messages are repeated in the logs of the cluster members hosting a production application
Problem | Recommended response |
---|---|
In a multi-cell environment, the following messages are repeated in the logs of the cluster
members hosting the production
application:
|
First, ensure each service integration bus member in the remote cell is started. Next,
ensure that the SIB_ENDPOINT_ADDRESS port is specified correctly for each service integration bus
member in the remote cell or core group. If the wrong port is specified, delete the outbound
configuration "--setup=dynacacheOutSIB --delete..." and reconfigure it using the correct port. When
everything is working correctly, a message similar to the following message displays in the
logs:
|
Platform messaging component cannot authenticate the user ID
Explanation | Recommended response |
---|---|
In a multi-cell environment, a service integration bus member has the following error:
This message might be misleading because the dynamic cache service does not use secure buses. |
This message might indicate one of the following problems: The service integration bus server is receiving a request for a bus destination that does not exist. Ensure the correct remote cell name was used when executing "--setup=dynacacheOutSIB" and "--setup=dynacacheECA" in the sending cell. No service integration bus members are available. This problem often occurs because the wrong cluster is specified when doing the inbound setup "--setup=dynacacheInSIB". Ensure the service integration bus cluster is specified for the "--cluster" option and not some other cluster. |
The messaging engine's unique ID does not match that found in the data store
Explanation | Recommended response |
---|---|
In a multi-cell environment, a service integration bus member has the following error:
|
Stop the server, delete the directory in WAS_INSTALL_ROOT\profiles\AppSrv01\filestores\com.ibm.ws.sib that corresponds to the service integration bus member, and restart the server. |
dynacacheJMSSIB script can not locate DynacacheMessageHandler.ear file
Explanation | Recommended response |
---|---|
In a multi-cell environment, the dynacacheJMSSIB script can not locate
DynacacheMessageHandler.ear file, and the following message appears in the
log:
|
Run the dynacacheJMSSIB script from WAS_INSTALL_ROOT/profiles/PROFILE_NAME/bin so that it can locate ../../../util/dynacacheJMSSIB.py and ../../../installableApps/DynacacheMessageHandler.ear at the appropriate relative paths. |