Infinispan - ISPN000476:等待请求响应超时
Posted
技术标签:
【中文标题】Infinispan - ISPN000476:等待请求响应超时【英文标题】:Infinispan - ISPN000476: Timed out waiting for responses for request 【发布时间】:2021-11-10 17:01:42 【问题描述】:我使用infinispan 7.2.5
在JBoss 7.2
服务器上创建CacheService
Singleton
,但在通信过程中出现超时错误。我尝试将超时从默认值增加到 35000 毫秒,但这没有帮助。我的配置有什么突出的地方可能导致这些错误吗?
错误
javax.ejb.EJBTransactionRolledbackException: ISPN000476: Timed out waiting for responses for request 387 from devserver-44351
.....
Caused by: org.infinispan.util.concurrent.TimeoutException: ISPN000476: Timed out waiting for responses for request 387 from devserver-44351
启动代码
@PostConstruct
void start()
logger.info("Starting cache service...");
GlobalConfiguration gc = new GlobalConfigurationBuilder().transport().defaultTransport()
.globalJmxStatistics().allowDuplicateDomains(true).cacheManagerName("Cache").build();
Configuration config = new ConfigurationBuilder().clustering().cacheMode(CacheMode.REPL_SYNC).sync().replTimeout(35000).build();
cacheManager = new DefaultCacheManager(gc);
cacheManager.defineConfiguration("times", config);
lastGetTimesCache = cacheManager.getCache("times");
logger.info("Cache service started!");
【问题讨论】:
【参考方案1】:添加一个 jgroups 配置解决了这个问题
@PostConstruct
void start()
logger.info("Starting cache service...");
GlobalConfiguration gc = new GlobalConfigurationBuilder().transport().defaultTransport()
.addProperty("configurationFile", "infinispan-jgroups.xml").globalJmxStatistics().allowDuplicateDomains(true).cacheManagerName("Cache").build();
Configuration config = new ConfigurationBuilder().clustering().cacheMode(CacheMode.REPL_SYNC).sync().replTimeout(35000).build();
cacheManager = new DefaultCacheManager(gc);
cacheManager.defineConfiguration("times", config);
lastGetTimesCache = cacheManager.getCache("times");
logger.info("Cache service started!");
【讨论】:
以上是关于Infinispan - ISPN000476:等待请求响应超时的主要内容,如果未能解决你的问题,请参考以下文章
JBoss EAP 6.1 的 Infinispan 超时异常