SystemError: ({'status': '500', 'content-length': '4330', 'cache-control': 'must-revalidate,no-cache,no-store', 'content-type': 'text/html; charset=iso-8859-1', 'server': 'Jetty(6.1.25)'}, '<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>\n<title>Error 500 GC overhead limit exceeded</title>\n</head>\n<body><h2>HTTP ERROR 500</h2>\n<p>Problem accessing /db/data/ext/GremlinPlugin/graphdb/execute_script. Reason:\n<pre> GC overhead limit exceeded</pre></p><h3>Caused by:</h3><pre>java.lang.OutOfMemoryError: GC overhead limit exceeded\n\tat java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:45)\n\tat java.lang.StringBuilder.<init>(StringBuilder.java:68)\n\tat org.neo4j.server.rest.repr.Serializer.joinBaseWithRelativePath(Serializer.java:101)\n\tat org.neo4j.server.rest.repr.Serializer.relativeUri(Serializer.java:79)\n\tat org.neo4j.server.rest.repr.MappingSerializer.putUri(MappingSerializer.java:36)\n\tat org.neo4j.server.rest.repr.ValueRepresentation$1.putTo(ValueRepresentation.java:108)\n\tat org.neo4j.server.rest.repr.ObjectRepresentation$PropertyGetter.putTo(ObjectRepresentation.java:132)\n\tat org.neo4j.server.rest.repr.ObjectRepresentation.serialize(ObjectRepresentation.java:143)\n\tat org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:40)\n\tat org.neo4j.server.rest.repr.ListSerializer.addMapping(ListSerializer.java:56)\n\tat org.neo4j.server.rest.repr.MappingRepresentation.addTo(MappingRepresentation.java:52)\n\tat org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:60)\n\tat org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:73)\n\tat org.neo4j.server.rest.repr.ListSerializer.addList(ListSerializer.java:61)\n\tat org.neo4j.server.rest.repr.ListRepresentation.addTo(ListRepresentation.java:67)\n\tat org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:60)\n\tat org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:51)\n\tat org.neo4j.server.rest.repr.OutputFormat.format(OutputFormat.java:123)\n\tat org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:100)\n\tat org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:48)\n\tat org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat java.lang.reflect.Method.invoke(Method.java:597)\n\tat com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n</pre>\n<hr /><i><small>Powered by Jetty://</small></i><br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n<br/> \n\n</body>\n</html>\n')
config = bulbs.config.Config('http://'+host+':7474/db/data')g = Graph(config)g.config.autoindex = Falsescript='g.V.filter{it.name=="NAME'"}.inE.outV.loop(2){it.loops<=3}{true}.paths'results = g.client.gremlin(script)return resultsBut it was working fine yesterday. It's only a few thousand nodes, so if it returned them all (which it doesn't), I would be surprised if that exceeded GC.Very odd.
Thanks James. I will try it. I have a lot of code here to update still based on new versions of stuff, so still playing catch up!I tried the bulbflow link but maybe the server is down? I was waiting for the docs there to be updated for 0.3 so that's good news!
I tried your suggestion and get some errors. Here is my code context.config = bulbs.config.Config('http://'+host+':7474/db/data')g = Graph(config)g.config.autoindex = Falsescript = 'g.idx(index_name)[[name:vname]].out.loop(2){it.loops<=3}{true}.paths'params = dict(index_name='vertex', vname=entity)results = g.gremlin.execute(script, params)AttributeError: 'Gremlin' object has no attribute 'execute'
Then I tried.....config = bulbs.config.Config('http://'+host+':7474/db/data')g = Graph(config)g.config.autoindex = Falsescript = 'g.idx(index_name)[[name:vname]].out.loop(2){it.loops<=3}{true}.paths'params = dict(index_name='vertex', vname=entity)results = g.client.gremlin(script, params)SystemError: ({'status': '500', 'content-length': '4847', 'content-encoding': 'UTF-8', 'server': 'Jetty(6.1.25)', 'access-control-allow-origin': '*', 'content-type': 'application/json'}, '{\n "exception" : "java.lang.NullPointerException",\n
For some reason, I can't get to bulbflow.com right now, it times out. All my other sites load. Just fyi.
James,Thanks again. So far, I'm catching up with your suggestions and improving things. The index stuff from yesterday helped and I can abandon g.V (not sure why it exists or why its provided in Gremlin tutorials though).And this current suggestion works, but sorta. It seems that I get intermittent GC limit exceed and now Java Heap exceptions[1] depending if the vertex in question is more than a couple edges.Also, if I adjust the loop factor it.loops<=3 to it.loops<=2 in some cases it corrects the problem.This is leading me to think that Gremlin is not very efficient nor scalable and somewhere there is a geometric calculation occurring. It seems neo4j/blueprints doesn't re-write the gremlin logic to an optimal expression. My simple looping query over a meager 5k vertex, 10k edge is causing Neo4j to exhaust all resources. This can't be right....so I must be missing something here again. I'll keep trying.
I was told[1] that script is the best way to "fan out" from a given vertex, up to 3 edges away....
I had to modify the script slightly so the results would include edges. Even if the script obtained ALL the edges and nodes in my database,that is only like 15,000....
[1] http://groups.google.com/group/gremlin-users/browse_thread/thread/b624f5b181128727
How many nodes is your script returning? I guess it is the JSON serialization taking that memory. Returning smaller chunks of less data (e. G. Node properties instead of full node representation) would be better...
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j - Graphs rule.
Program or be programmed - Computer Literacy for kids.
http://foocafe.org/#CoderDojo
In some cases, it looks like it can return 1000 nodes. I'm reusing vertices but not edges. So there can be many duplicate edges (for counting).How does one return just node properties? That's all I really need, but I see a lot of other stuff in nodes like URLs.Perhaps its a question for James as well since I'm using bulbs neo4jserver graph.
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j - Graphs rule.
Program or be programmed - Computer Literacy for kids.
http://foocafe.org/#CoderDojo
Hi,
Gremlin is a lazy language so you can next() results all day long. If you are trying to save all these results in memory, then you will run into problems.
What is your query scenario?
Marko.
What I see happening here is a combinatorial explosion. As you can see, my data set is not that rich..... :(
On Wednesday, April 11, 2012 4:50:53 PM UTC-4, Darren Govoni wrote:Here's my basic query.
g.idx('vertex')[[name:'document']].bothE.bothV.loop(2){it.loops<=4}{true}.paths.count()for it.loops<2, count is 288for it.loops<3, count is 3278for it.loops<4, count is 46,960
Hi,That is odd. Here are some notes:1. Use 'both' instead of bothE.bothV (and then loop(1))2. Try without paths and simply do count() (just for testing)That is such a tiny graph that I don't know why you are having a GC overhead limit exceeded. Are you doing this from the Gremlin REPL, a Groovy class, or from the Web Admin?Oh reading lower, I see you are doing some Bulbs related stuff----can you speak more to that as James is the Bulbs guy.....
Marko, he's returning all possible paths over REST -- all 47,000 of them -- but he doesn't really want or need this, he just wants the shortest path.