That is weird. GCR is only available in the enterprise edition, yet you are running community and that is the only option it will let you set? Perhaps try upgrading to 1.9.7 and then double-check to make sure you don’t have any enterprise-edition JARs on you classpath.
I don’t really know much about blueprints and the failure modes it can introduce, so I can’t help with that. -- Chris Vest System Engineer, Neo Technology [ skype: mr.chrisvest, twitter: chvest ] On 04 Jun 2014, at 07:12, Arvin <[email protected]> wrote: > Hi Chris, > > Thanks for your reply, I notice that in docs about object cache, it says > cache_type=soft is the default implementation, is it necessary to setting it > manual? > However, I setting cache_type=soft in my neo4j.properties and also setting in > through blueprint api (which is a HashMap object "configure" pass to [ new > Neo4jGraph(/path/to/graph.db, configure) ] > > and I got the following error: > > Exception in thread "main" java.lang.RuntimeException: Bad value 'soft' for > setting 'cache_type': must be one of [gcr] > at > com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:165) > at netdb.graph.unit.CacheManager.loadGraphToCache(CacheManager.java:131) > at netdb.graph.unit.CacheManager.findVertexInCache(CacheManager.java:67) > at netdb.graph.opts.framework.IndexedGraph.query(IndexedGraph.java:47) > at netdb.graph.opts.framework.run.OptsExecutor.run(OptsExecutor.java:62) > at netdb.graph.opts.framework.run.OptsExecutor.main(OptsExecutor.java:130) > Caused by: java.lang.IllegalArgumentException: Bad value 'soft' for setting > 'cache_type': must be one of [gcr] > at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:801) > at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:721) > at > org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:215) > at > org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:189) > at > org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:50) > at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:123) > at org.neo4j.kernel.configuration.Config.<init>(Config.java:91) > at > org.neo4j.kernel.InternalAbstractGraphDatabase.<init>(InternalAbstractGraphDatabase.java:220) > at > org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:103) > at > org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:81) > at > com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:153) > ... 5 more > > My neo4j version is neo4j-community-1.9.5 > and my blueprint api version is 2.4.0 > > Really appreciate your help! > > Chris Vest於 2014年6月4日星期三UTC+8上午5時21分16秒寫道: > Hi Arvin, > > The JVM want’s to use more memory than it is allowed to. In your stack trace, > the object cache is being created with an initial size that is too big to fit. > > Either allow a larger heap size for the JVM, or try setting cache_type=soft > in your neo4j.properties. > > You can read more about the object cache here: > http://docs.neo4j.org/chunked/stable/configuration-caches.html > And configuring memory for the JVM here: > http://docs.neo4j.org/chunked/stable/server-performance.html#_specifying_jvm_tuning_properties > > The “GCResistantCache” that you can see in the stack trace is an older name > for the High-Performance Cache that the documentation talks about. > > -- > Chris Vest > System Engineer, Neo Technology > [ skype: mr.chrisvest, twitter: chvest ] > > > On 03 Jun 2014, at 21:23, Arvin <[email protected]> wrote: > >> Hi everyone, I struggle with this problem couple days...and still can't >> figure out what happened >> Has it something wrong about blueprint api? >> >> Arvin於 2014年6月2日星期一UTC+8下午1時51分14秒寫道: >> Hi all, >> In my research project, I partition my whole graph data into many parts, and >> store each part in its own graph.db folder >> then, I may load 10 or 15 graph.db into memory at the same time( new >> Neo4jGraph(/path/to/graph.db) , I use blueprint api ), because I want to >> traverse on these part of graph which means if I can't find the node I want >> in this graph.db, I'll try to find it on other graph.db. >> >> It works fine at first, but when it ran for a while, it'll throw these >> exceptions: >> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space >> at >> java.util.concurrent.atomic.AtomicReferenceArray.<init>(AtomicReferenceArray.java:94) >> at >> org.neo4j.kernel.impl.cache.GCResistantCache.<init>(GCResistantCache.java:89) >> at >> org.neo4j.kernel.impl.cache.GCResistantCacheProvider.newRelationshipCache(GCResistantCacheProvider.java:75) >> at >> org.neo4j.kernel.impl.core.DefaultCaches.relationship(DefaultCaches.java:54) >> at >> org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:458) >> at >> org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:256) >> at >> org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106) >> at >> org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:81) >> at >> com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:153) >> at netdb.graph.unit.CacheManager.loadGraphToCache(CacheManager.java:125) >> at netdb.graph.unit.CacheManager.findVertexInCache(CacheManager.java:67) >> at netdb.graph.opts.framework.IndexedGraph.query(IndexedGraph.java:47) >> at netdb.graph.opts.framework.run.OptsExecutor.run(OptsExecutor.java:62) >> at netdb.graph.opts.framework.run.OptsExecutor.main(OptsExecutor.java:129) >> >> Does anyone know where should I look into? How can I avoid these error? >> any advice are welcome >> >> Thank you very much! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
