Spring

[Tomcat] 캐시에 추가할 수 없습니다. 왜냐하면 만료된 캐시 엔트리들을 없애버린 이후에도 여유 공안이 충분하지 않기 때문입니다. 캐시의 최대 크기를 증가시키는 것을 고려해 보십시오.

📝 작성 : 2021.08.31  ⏱ 수정 : 
728x90

톰캣 10.0 공식문서에 의하면 캐시의 최대 크기는 10mb라고 합니다.(8.0, 9.0도 동일)

The maximum size of the static resource cache in kilobytes. If not specified, the default value is 10240 (10 megabytes). This value may be changed while the web application is running (e.g. via JMX). If the cache is using more memory than the new limit the cache will attempt to reduce in size over time to meet the new limit. If necessary, cacheObjectMaxSize will be reduced to ensure that it is no larger than cacheMaxSize/20.

 

 

최대 크기인 10mb로 늘려주기 위해 톰캣/conf/context.xml 파일에 아래의 코드를 추가해줍니다.

<Resources cachingAllowed="true" cacheMaxSize="100000"/>
반응형