[Neo4j] Close with running transaction II

2011-09-07 Thread Vaccaro, Kristen M
Hi, I'm experiencing the same problem that is mentioned in a thread from a 
while back on this list 
(http://lists.neo4j.org/pipermail/user/2011-March/007746.html). This was a case 
where someone had a thread running when they try to close the database and 
keeping having a dirty log with "INFO: Close invoked with 1 running 
transaction(s)". As far as I know I close every transaction I open. The 
response to the other poster was that there is no way to force all transactions 
to end before shutting down -- which leaves me with the question: what are the 
risks of leaving the code as is? And what are the best practices to avoid this 
problem? (again, as far as I can see all transactions are ended).
Thanks,
Kristen

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Nuo Yan
Sent: Wednesday, September 07, 2011 2:12 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError


According to this: http://neo4j.org/forums/#nabble-td3248377, I upgraded to 
1.4.1 and the problem goes away.

I guess there must be a bug in the 1.4.0 REST API that leaks classloader memory 
or so, and GC didn't happen as expected in PermGen. Anyways, it looks great 
after upgrading to 1.4.1. Memory monitoring graph shows GC happens as desired 
in PermGen.

Thank you!

On Sep 6, 2011, at 11:30 PM, Nuo Yan wrote:

> Hey Adriano and everyone,
> 
> I finally got a chance to monitor/profile the neo4j process with VisualVM 
> when I run my set of tests.
> 
> It seems that after running the set of tests once, ~ 50M of PermGen was used. 
> However, subsequent test runs simply multiples that, which worries me a 
> little. After the fourth run of the tests, ~ 200M of PermGen space was used.
> 
> My app accesses to neo4j completely using the REST interface. During the test 
> run, new nodes and relationships are  being frequently created. There are 
> batch requests that performs multiple actions at once (number of actions is 
> reasonable, really small in this case, usually a few, or tenth). There are 
> also gremlin script executions through REST (send the gremlin query over to 
> the server through REST API). Most of the gremlin queries are traversals and 
> returns the vertices or edges match the constraints.
> 
> Total number of nodes created during a test run is only hundreds. There are 
> more relationships, but at most thousands.
> 
> That's basically all of the things that are done against neo4j server during 
> a test run. Given this, do you think the PermGen usage is reasonable? Or do 
> you think something is very wrong? I worried that setting a larger PermGen 
> would only postpone but not resolve the OutOfMemory problem. 
> 
> Let me know if any other info is needed.
> 
> Thanks much,
> Nuo
> 
> 
> 
> 
> On Aug 29, 2011, at 6:09 AM, Adriano Henrique de Almeida wrote:
> 
>> Hi Nuo, any results here?
>> 
>> Cheers
>> 
>> 2011/8/26 Nuo Yan 
>> 
>>> Hey Adriano,
>>> 
>>> Thanks very much for your reply. I will try with MaxPermSize.
>>> 
>>> It's on my local machine, we are evaluating Neo4j and do not have it on
>>> production yet. I'm accessing the server through the REST APIs, the app is
>>> separate from Neo. I will see if I can do some profiling on Neo when I run
>>> my tests.
>>> 
>>> Thanks,
>>> Nuo
>>> 
>>> 
>>> 
>>> On Fri, Aug 26, 2011 at 3:53 PM, Adriano Henrique de Almeida <
>>> adrianoalmei...@gmail.com> wrote:
>>> 
 Hey Nuo,
 
 wrapper.java.maxmemory and Xmx won't help, since it is a PermGenSpace
 problem, and they only deal with HeapSpace. Did you try with:
 -XX:*MaxPermSize
 **?*
 
 Anyway, something very wrong is happening, since you have few nodes.
 
 It is happening only on production, or development also? If it is
>>> happening
 on development, try to isolate the situation where you're stucking the
 permgen. Run you app with VisualVM, for instance, or any other profiler.
 Aren't you dealing with classloaders on your app?
 
 Cheers
 
 Adriano Almeida
 
 
 
 2011/8/26 Jim Webber 
 
> Hi Nuo,
> 
> if you're using Neo4j server then you can edit the value in
> conf/neo-wrapper.conf
> 
> wrapper.java.maxmemory=1024
> 
> Jim
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> 
 
 
 
 --
 Adriano Almeida
 Caelum | Ensino e Inovação
 www.caelum.com.br
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
>>> ___
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>> 
>> 
>> 
>> 
>> -- 
>> Adriano Almeida
>> Caelum | Ensino e Inovação
>> www.caelum.com.br
>> ___

[Neo4j] Multiple sessions

2011-07-01 Thread Vaccaro, Kristen M
Hi, I have a question about sessions in Neo4j. I'm working with the embedded 
Java (not as a server) and I can load my data and query it between transactions 
without trouble. My question is whether/how it's possible to shut down my 
database at the end of a session and then access it in a new session later.

Something like first doing:
GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "var/test/base" );
...Add all my data using transactions
graphDb.shutdown();

Then later opening a new session and accessing that database and indices I've 
already made. Is that possible (I didn't see anything covering that in the 
wiki/documentation)? Or will I need to convert to the server version?
Kristen

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Basic Ruby/Neo4j question

2011-05-11 Thread Vaccaro, Kristen M
Hi, I just started using Neo4j and I've got a pretty basic question. I've been 
running the gem using JRuby but I'm having trouble calling on edges/nodes I've 
made in previous transactions. So one of the very basic example scripts I've 
been working with looks like:

require "rubygems"
require 'neo4j'
Neo4j::Transaction.run do
a = Neo4j::Node.new :name => 'A'
b = Neo4j::Node.new :name => 'B'
c = Neo4j::Node.new :name => 'C'
d = Neo4j::Node.new :name => 'D'
e = Neo4j::Node.new :name => 'E'
a.outgoing(:friends) << b << c
b.outgoing(:friends) << d << e
c.outgoing(:friends) << b
end

If I call on any of those within the same transaction, things work great, but 
if I run that and then open a new transaction to query it, say:

Neo4j::Transaction.run do
a.outgoing(:friends).depth(2).each {|node| puts node[:name]}
end

I get undefined local variable errors for a. I thought that maybe I was missing 
a step where the database committed, but when I tried to switch over to the 
"Transaction.new ... Transaction.finish" formulation, I started getting 
undefined method errors for 'finish'... I assume I'm missing some basic step, 
but didn't see an answer in the examples/documentation, so I'd appreciate any 
help!
Kristen
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user