将Infinispan从9.4.11.Final更新到10.0.1.Final后,尝试启动第四个缓存时,多个缓存的启动会产生此错误。在以前的版本中,它运行平稳。
Caused by: java.lang.RuntimeException: org.infinispan.commons.CacheConfigurationException: Error starting component org.infinispan.persistence.manager.PersistenceManager
at com.metaproc.core.datagrid.impl.InfinispanDatagridServiceImpl.<init>(InfinispanDatagridServiceImpl.java:139) ~[?:?]
... 71 more
Caused by: org.infinispan.commons.CacheConfigurationException: Error starting component org.infinispan.persistence.manager.PersistenceManager
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:555) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:561) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:344) ~[?:?]
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:240) ~[?:?]
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:207) ~[?:?]
at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1091) ~[?:?]
at org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:513) ~[?:?]
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:693) ~[?:?]
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:632) ~[?:?]
at org.infinispan.manager.DefaultCacheManager.startCache(DefaultCacheManager.java:1024) ~[?:?]
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method) ~[?:?]
at java.lang.Thread.start(Thread.java:717) ~[?:?]
at org.infinispan.persistence.sifs.Index.start(Index.java:75) ~[?:?]
at org.infinispan.persistence.sifs.SoftIndexFileStore.startIndex(SoftIndexFileStore.java:242) ~[?:?]
at org.infinispan.persistence.sifs.SoftIndexFileStore.start(SoftIndexFileStore.java:161) ~[?:?]
at org.infinispan.persistence.support.ComposedSegmentedLoadWriteStore.startNewStoreForSegment(ComposedSegmentedLoadWriteStore.java:258) ~[?:?]
at org.infinispan.persistence.support.ComposedSegmentedLoadWriteStore.start(ComposedSegmentedLoadWriteStore.java:244) ~[?:?]
at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$startWriter$42(PersistenceManagerImpl.java:1304) ~[?:?]
at org.infinispan.persistence.manager.PersistenceManagerImpl.startStore(PersistenceManagerImpl.java:1333) ~[?:?]
at org.infinispan.persistence.manager.PersistenceManagerImpl.startWriter(PersistenceManagerImpl.java:1296) ~[?:?]
at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$start$0(PersistenceManagerImpl.java:193) ~[?:?]
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:?]
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:193) ~[?:?]
at org.infinispan.persistence.support.DelegatingPersistenceManager.start(DelegatingPersistenceManager.java:39) ~[?:?]
at org.infinispan.persistence.support.CorePackageImpl$1.start(CorePackageImpl.java:30) ~[?:?]
at org.infinispan.persistence.support.CorePackageImpl$1.start(CorePackageImpl.java:24) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:587) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:584) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:578) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:561) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:605) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:569) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:547) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30) ~[?:?]
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:770) ~[?:?]
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:344) ~[?:?]
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:240) ~[?:?]
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:207) ~[?:?]
at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1091) ~[?:?]
at org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:513) ~[?:?]
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:693) ~[?:?]
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:632) ~[?:?]
at org.infinispan.manager.DefaultCacheManager.startCache(DefaultCacheManager.java:1024) ~[?:?]
我们正在使用此配置:
final SoftIndexFileStoreConfigurationBuilder persistentStoreConfiguration =
new SoftIndexFileStoreConfigurationBuilder(configurationBuilder)
.indexLocation(indexPath)
.dataLocation(dataPath)
.maxNodeSize(8192)
.fetchPersistentState(true);
new ConfigurationBuilder()
.locking()
.isolationLevel(IsolationLevel.REPEATABLE_READ)
.lockAcquisitionTimeout(30000)
.useLockStriping(false)
.transaction()
.autoCommit(true)
.completedTxTimeout(60000)
.lockingMode(LockingMode.OPTIMISTIC)
.transactionMode(TransactionMode.TRANSACTIONAL)
.notifications(true)
.reaperWakeUpInterval(30000)
.cacheStopTimeout(30000)
.transactionManagerLookup(new GenericTransactionManagerLookup())
.clustering()
.cacheMode(CacheMode.DIST_SYNC)
.stateTransfer()
.fetchInMemoryState(true)
.hash().numOwners(2)
.l1()
.lifespan(-1)
.memory()
.size(1)
.persistence()
.passivation(true)
.addStore(persistentStoreConfiguration).build();
看起来软索引文件存储的某些配置不再正确,我只是无法弄清楚它可能是什么。我试图减小maxNodeSize,但没有成功。有人可以指出我升级后需要调整配置的部分吗,或者我还缺少其他任何内容?
我很确定这是由SoftIndexFileStore被分段并创建了一堆额外的线程引起的。应在控制台输出中记录一条WARN消息,说明已达到某种程度。
您也可以在Upgrading Guide上阅读此内容。
您可以通过在xml配置上设置segmented="false"
属性来明确定义不进行细分的商店。由于您使用的是程序配置,因此只需在代码中添加.segmented(false)
。 Source Reference