【问题标题】:Timeout Exception in Weblogic Coherence CacheWeblogic Coherence 缓存中的超时异常
【发布时间】:2014-05-27 23:17:02
【问题描述】:

我们使用 WebLogic Server 10.3.4 并设置了一个由 3 个托管服务器和一个一致性缓存组成的集群。最近,当应用程序尝试更新(添加或编辑)缓存时,我们遇到了一些超时异常。频率大约是每小时几次,它只发生在一些请求上,而不是所有请求,因为大多数时候应用程序仍然可以更新缓存。

我们在 coherence xml 文件中使用单位计算器设置了上限和策略。我们试图监控内存使用情况,因为我们担心它可能是 GC,但不太可能。每个托管服务器上的堆大小设置为 2GB,当缓存远未完全填满时会出现异常。此外,我们已经完成了将记录插入完整缓存的测试,它仍然可以按预期工作。

所以我想问一下我们应该查看哪些信息才能了解为什么会出现这种异常。

 <Caught exception com.tangosol.net.RequestTimeoutException: Request timed out after 15016 millis, forwarding details to client.
com.tangosol.net.RequestTimeoutException: Request timed out after 15016 millis
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.checkRequestTimeout(Grid.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:53)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ReplicatedCache.requestIssue(ReplicatedCache.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ReplicatedCache.updateResource(ReplicatedCache.CDB:38)
    at com.tangosol.coherence.component.util.CacheHandler.put(CacheHandler.CDB:11)
    at com.tangosol.coherence.component.util.CacheHandler.put(CacheHandler.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)

连贯性 xml 片段:

 <replicated-scheme>
              <scheme-name>@coherence.membership.number.cache.scheme@</scheme-name>
              <request-timeout>15000ms</request-timeout>
              <backing-map-scheme>
                <local-scheme>
                  <scheme-name>local-with-eviction-for-membership-num</scheme-name>
                  <eviction-policy>LRU</eviction-policy>
                  <high-units>32000</high-units>
                  <low-units>10</low-units>           
                  <unit-calculator>FIXED</unit-calculator>
                  <expiry-delay>@coherence.membership.number.cache.expiryminutes@m</expiry-delay>
                </local-scheme>
              </backing-map-scheme>
          </replicated-scheme>
        <replicated-scheme>

【问题讨论】:

    标签: caching weblogic oracle-coherence


    【解决方案1】:
    1. 这是一个请求超时。请求超时用于避免调用线程阻塞超过“n”秒。如果这不是所需的行为,您可以从配置中删除请求超时。

    2. 通常,偶尔的超时是由长时间的 GC 暂停引起的。听起来您的应用程序可能偶尔会出现长时间的 GC 暂停。使用 JVM 上的“verbose GC”选项来记录 GC 时间。

    【讨论】:

    • 感谢您的建议。根据你的第一个建议,如果去掉time-out配置后出现long GC会发生什么?在这种情况下程序会做什么?
    • 它会阻塞,等待结果。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-19
    • 2018-06-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多