Tongweb 应用报错: [The background cache eviction process was unable to free [10] percent of the cache

报错详情:


[2023-04-07 14:27:36 894] [INFO] [ContainerBackgroundProcessor[StandardEngine[TONGWEB]]] [core] [The background cache eviction process was unable to free [10] percent of the cache for Context [dcscloud] - consider increasing the maximum size of the cache. After eviction approximately [93,809] KB of data remained in the cache.]
[2023-04-07 14:27:36 898] [INFO] [main] [core] [TongWeb server startup complete in 87077 ms.]
[2023-04-07 14:27:36 898] [INFO] [main] [systemout] [System.out is closed!]
[2023-04-07 14:27:46 902] [INFO] [ContainerBackgroundProcessor[StandardEngine[TONGWEB]]] [core] [The background cache eviction process was unable to free [10] percent of the cache for Context [dcscloud] - consider increasing the maximum size of the cache. After eviction approximately [92,298] KB of data remained in the cache.]

处理办法: 在对应的虚拟主机客户,增加以下属性:

1、cacheMaxSize: 设置静态资源缓存的最大值,单位为K.

2、cachingAllowed: 设置是否允许启用静态资源如图片、html声音等,默认为true.

3、cacheObjectMaxSize: 为当前虚拟机设定部署的应用允许的缓存最大的文件容量,大小超过文件将不被缓存。 cacheObjectMaxSize限定在 cacheMaxSize/20以下。

设这个cacheMaxSize 值一般要比应用所有静态资源总合要大,才不报此类警告

设置方法:点击 Tongweb管理控制台,点击WEB容器配置---虚拟主机管理

点击要配置的主机名称,进入编辑页面:点击【添加】:

   除去提示,还可以通过Tongweb的应用监视 里 通过打开监视,查看监视对应的数据来进行。 

Tongweb应用监视打开方法:点击 【监视】--【监视配置】:

 这里因为提示与缓存有关系,因此我们把【应用资源缓存】的监视开启,点击【保存】按钮。

开启应用资源缓存的监视之后,就可以通过【监视】--【监视明细】---【应用资源缓存】,选择切换到对应主机以及对应的应用即可查看缓存情况:

当前缓存数 :当前应用已经缓存的数据大小, 最大缓存数:当前允许的最大缓存数 

从获取到的数据看  就是 : 剩余在大小 已经少于最大缓存数的 10%了, 因此 适当调整,根据应用具体情况去调整一下。 不能太大,也不能小了。 具体自己去尝试吧。 

猜你喜欢

转载自blog.csdn.net/yeyuningzi/article/details/130012874