Smarts NCM - Repeating INFO Message Seen in Catalina.out Log in NCM Version 9.4: The background cache eviction process was unable to free [10] percent of the cache for Context [/voyence]
search cancel

Smarts NCM - Repeating INFO Message Seen in Catalina.out Log in NCM Version 9.4: The background cache eviction process was unable to free [10] percent of the cache for Context [/voyence]

book

Article ID: 331059

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:




In NCM 9.4 (unpatched), a cache INFO message is seen repeating constantly in /opt/smarts-ncm/ncmcore/logs/catalina.out.

The following message is similar to what may be seen:

05-Jun-2015 13:04:54.985 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/voyence] - consider increasing the maximum size of the cache. After eviction approximately [39,974] KB of data remained in the cache.


Environment

VMware Smart Assurance - NCM

Cause

This is a warning message and not a critical one. This issue occurs because of the version upgrade from tomcat 7 to tomcat 8 in NCM 9.4.

In Tomcat 7, there is no warning message for cache:
 
// Add new entry to cache
synchronized (cache) {
// Check cache size, and remove elements if too big
if ((cache.lookup(name) == null) && cache.allocate(entry.size)) 
{ cache.load(entry); } 
}

In Tomcat 8, the code has this warning message printed in the log file: 

if (newSize > maxSize) 
{ // Unable to create sufficient space for this resource // Remove it from the cache removeCacheEntry(path); log.warn(sm.getString("cache.addFail", path)); } 

Resolution

To resolve this issue, install NCM Patch 1 or Patch 2 for NCM 9.4.

Alternatively, the cache messaging can be suppressed using the following steps:

Open log4j.xml file: $VOYENCE_HOME/ncmcore/webapps/ncm-webapp/WEB-INF/classes/log4j.xml
 
Locate this category and add the below category org.apache.catalina.webresources.Cache:

<category name="SAML">
<priority value="INFO"/>
<appender-ref ref="SAML"/>
</category>
<category name="org.apache.catalina.webresources.Cache">
<priority value="OFF"/>
</category>


Restart the Application Server service: service ncm-as restart

The cache eviction messaging should no longer appear in the Catalina.out log file.