Tomcat launcher times to the cache because there is insufficient free space available after evict

Source: Internet
Author: User
Tags tomcat

I'm running the MAVEN project with idea, it's very slow when Tomcat starts.

And when Tomcat starts, it will report a lot of XX ... to the cache because there is insufficient free space available after evict

Say my cache is not enough Baidu translation is: Tomcat cache because there is not enough free space to load files


What I thought was the mistake of idea, and then I fixed the memory on the internet for his idea. But when it starts up, it's going to burst a lot of alarms, seriously slowing down the time I started the project,

Later on the internet to find someone else's answers I tried it and then it worked.

Here is an example

Added in the <Context> in Tomcat's/conf/context.xml

<resources
Cachingallowed= "true"
Cachemaxsize= "100000"----> This unit is in KB
/>


And then my boss gave me a little bit of guidance.

Here are the results of the website excerpt

Resources are resource definition elements

Cachingallowed and Cachemaxsize are public properties

The meaning of the Representative is:

Cachingallowed: If the value of this flag is true, the cache will be used for the static resource. If not specified, the default value of the flag is true. This value can be changed while the Web application is running (for example, through JMX). When caching is disabled in the cache, any resources are currently purged from the cache.

Cachemaxsize:

The maximum size of the static resource cache in kilobytes. If not specified, the default value is 10240 (10 megabytes). This value can be changed while the Web application is running (for example, through JMX). If the cache is using more memory than the new limit cache will attempt to scale over time to meet the new limit to reduce. If necessary, the cacheobjectmaxsize will be lowered to ensure that it is not less than CACHEMAXSIZE/20.


This is Apache's official website document:


Https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html#Attributes


OK Problem Solving


Then, the same way or thank the network of Elder Daniel, thank you for your knowledge and answers and cases







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.