开发者

Neo4j server locks database. Why?

I just started to discover the world of Neo4j and stumbled right into an issue, I have problems to grasp.

I installed Neo4j and started it via bin/neo4j start.

In the next steps I wrote a ruby script that creates new nodes, after installing jruby and the neo4j gem. Everything fine until here.

How to get started is decribed here: http://wiki.neo4j.org/content/Getting_Started_With_Ruby

My Problem: When the server is started and I try to creates nodes, Neo4j responds that the database is locked. When I stop the server the nodes get created.

I am used to relational databases, so I don´t understand this behaviour.

When I check th开发者_StackOverflowe Server Info via the Neo4j Webadmin Tool (http://localhost:7474/webadmin) the ReadOnly flag is set to false.

It seems to me that the Neo4j approach is maybe different from relational db, meaning the server could maybe have a slightly other purpose then a db server.

Thanks for any advices, Tobias


The JRuby bindings will start it's own Neo4j instance, meaning that you will end up having two database instances trying to use the same files.

The approach is somewhat different, but relational databases use it as well, for example Apache Derby. As with Neo4j, you can either embed it in your application (that is what the JRuby bindings are doing in your case) or run it as a standalone server.

So just don't start a server yourself, that should solve the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜