8

I have just upgraded from 7.0.52 to 8.0.14.

I am getting this for lots of static image files:

org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/base/1325/WA6144-150x112.jpg] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

I haven't specified any particular resource settings, and I didn't get this for 7.0.52.

I have found mention of this happening at startup in a bug report that was supposedly fixed. For me this is happening not at startup but constantly when the resource is requested.

Is anybody else having this issue?

Thanks.

Trying to at least just disable the cache, but I cannot find an example of how to specify not to use the cache. The attributes have gone from the context in 8. Have tried adding a resource but cannot get the config right.

<Resource name="file" 
    cachingAllowed="false"
    className="org.apache.catalina.webresources.FileResourceSet"
/>  
13

You have few errors:

  1. Should be <Resources> (plural)
  2. FileResourceSet could be defined in <Resources><PreResource> section if needed and etc... not well documented yet: The Context Container

This works fine for me with Tomcat 8.0.15 & Liferay Portal 6.2.1 GA2 (which has a lot of static files + JDBC pool):

<?xml version='1.0' encoding='utf-8'?>
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <Resources
        cachingAllowed="true"
        cacheMaxSize="100000"
    />
    <Resource name="jdbc/liferay"
        auth="Container"
        type="javax.sql.DataSource"
        maxActive="64"
        maxIdle="16"
        maxWait="1000"
        username="root"
        password=""
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost/lp_621_ga2_patched?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false&amp;autoReconnect=true"
        validationQuery="select 1;"
    />
</Context>
0

Get to the file tomcat/conf/logging.properties

Change

.level = FINE 

to

.level = SEVERE (or ERROR)

and comment that line

org.apache.catalina.webresources.Cache.level = SEVERE
#org.apache.catalina.webresources.Cache.level = FINE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.