ehCache“从存储库中失败”失败

时间:2018-10-24 10:17:37

标签: hibernate grails ehcache-3

在prelive系统上运行grails应用程序几个小时后,我们会得到一个随机发生的异常:

HHH000327: Error performing load command : org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Faulting from repository failed

我们无法重现此异常。我们用于ehcache-plugin的cache-config.xml看起来像这样:

<?xml version="1.0" encoding="UTF-8"?>
    <!--http://www.ehcache.org/documentation/3.2/-->
<config
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.ehcache.org/v3'
xsi:schemaLocation="ehcache-core.xsd">


<persistence directory="java.io.tmpdir"/>


<!-- test caches -->
<cache alias="20s">
    <expiry>
        <ttl unit="seconds">20</ttl>
    </expiry>
    <heap>2</heap>
</cache>



<!-- production caches -->
<cache alias="30s">
    <expiry>
        <ttl unit="seconds">30</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

<cache alias="1m">
    <expiry>
        <ttl unit="minutes">1</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

<cache alias="5m">
    <expiry>
        <ttl unit="minutes">5</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

<cache alias="1h">
    <expiry>
        <ttl unit="hours">1</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

<cache alias="1d">
    <expiry>
        <ttl unit="days">1</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

<cache alias="7d">
    <expiry>
        <ttl unit="days">7</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

<cache alias="30d">
    <expiry>
        <ttl unit="days">30</ttl>
    </expiry>
    <heap>10000</heap>
</cache>

</config>

我们使用Grails 3.3.1,ehCache-plugin 3.0.0M,hibernate-ehcache 5.1.5 final

如何防止应用程序引发此异常?感谢您的建议。

0 个答案:

没有答案