title: "Unknown error" with cypher query on all relations
body: <p>Using neo4j 2.0.1 I frequently observe Java heap space problems. For example when trying to delete all relations of one type I only get an "unknown error".</p>
  
  <p>I'm running neo4j server on my local machine (kubuntu 13.10) with 8 gig ram, 6gig java heap space. the same happens when performing the query on a virtual ubuntu server.</p>
  
  <p>did not observe these issues with previous versions.</p>
  
  <p>I also attached the neo4j output from the console. I'm not a java developer, so it does not really help me.</p>
  
  <p>thanks for suggestions</p>
  
  <pre><code>Starting Neo4j Server console-mode...
  Using additional JVM arguments:  -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xms512m -Xmx6196m
  Detected incorrectly shut down database, performing recovery..
  13:50:00.431 [main] WARN  o.e.j.server.handler.ContextHandler - o.e.j.s.ServletContextHandler@35f6002a{/,null,null} contextPath ends with /
  13:50:00.431 [main] WARN  o.e.j.server.handler.ContextHandler - Empty contextPath
  13:50:00.433 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.0.5.v20130815
  13:50:00.458 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler@453831c{/,null,AVAILABLE}
  13:50:00.534 [main] INFO  o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /webadmin, did not find org.apache.jasper.servlet.JspServlet
  13:50:00.546 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@3c3aea35{/webadmin,jar:file:/media/data/software/Neo4j/system/lib/neo4j-server-2.0.1-static-web.jar!/webadmin-html,AVAILABLE}
  13:50:00.950 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@2078afe{/db/manage,null,AVAILABLE}
  13:50:01.206 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@216e21b4{/db/data,null,AVAILABLE}
  13:50:01.224 [main] INFO  o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /browser, did not find org.apache.jasper.servlet.JspServlet
  13:50:01.225 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@513f27b6{/browser,jar:file:/media/data/software/Neo4j/system/lib/neo4j-browser-2.0.1.jar!/browser,AVAILABLE}
  13:50:01.314 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@35f6002a{/,null,AVAILABLE}
  13:50:01.327 [main] INFO  o.e.jetty.server.ServerConnector - Started ServerConnector@42f400c3{HTTP/1.1}{localhost:7474}
  13:50:01.756 [main] INFO  o.e.jetty.server.ServerConnector - Started ServerConnector@40671ba6{SSL-HTTP/1.1}{localhost:7473}
  13:50:02.380 [Thread-24] INFO  o.e.jetty.server.ServerConnector - Stopped ServerConnector@42f400c3{HTTP/1.1}{localhost:7474}
  13:50:02.384 [Thread-24] INFO  o.e.jetty.server.ServerConnector - Stopped ServerConnector@40671ba6{SSL-HTTP/1.1}{localhost:7473}
  13:50:02.385 [Thread-24] INFO  o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@35f6002a{/,null,UNAVAILABLE}
  13:50:02.386 [Thread-24] INFO  o.e.j.server.handler.ContextHandler - Stopped o.e.j.w.WebAppContext@513f27b6{/browser,jar:file:/media/data/software/Neo4j/system/lib/neo4j-browser-2.0.1.jar!/browser,UNAVAILABLE}
  13:50:02.387 [Thread-24] INFO  o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@216e21b4{/db/data,null,UNAVAILABLE}
  13:50:02.387 [Thread-24] INFO  o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@2078afe{/db/manage,null,UNAVAILABLE}
  13:50:02.388 [Thread-24] INFO  o.e.j.server.handler.ContextHandler - Stopped o.e.j.w.WebAppContext@3c3aea35{/webadmin,jar:file:/media/data/software/Neo4j/system/lib/neo4j-server-2.0.1-static-web.jar!/webadmin-html,UNAVAILABLE}
  13:50:02.388 [Thread-24] INFO  o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.h.MovedContextHandler@453831c{/,null,UNAVAILABLE}
  Starting Neo4j Server console-mode...
  Using additional JVM arguments:  -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xms512m -Xmx6196m
  13:50:11.228 [main] WARN  o.e.j.server.handler.ContextHandler - o.e.j.s.ServletContextHandler@21b4406c{/,null,null} contextPath ends with /
  13:50:11.228 [main] WARN  o.e.j.server.handler.ContextHandler - Empty contextPath
  13:50:11.230 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.0.5.v20130815
  13:50:11.256 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler@13b357fd{/,null,AVAILABLE}
  13:50:11.346 [main] INFO  o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /webadmin, did not find org.apache.jasper.servlet.JspServlet
  13:50:11.358 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@24c13894{/webadmin,jar:file:/media/data/software/Neo4j/system/lib/neo4j-server-2.0.1-static-web.jar!/webadmin-html,AVAILABLE}
  13:50:11.813 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@66d51e79{/db/manage,null,AVAILABLE}
  13:50:12.108 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@4984bbd4{/db/data,null,AVAILABLE}
  13:50:12.129 [main] INFO  o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /browser, did not find org.apache.jasper.servlet.JspServlet
  13:50:12.131 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@3f30e292{/browser,jar:file:/media/data/software/Neo4j/system/lib/neo4j-browser-2.0.1.jar!/browser,AVAILABLE}
  13:50:12.241 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@21b4406c{/,null,AVAILABLE}
  13:50:12.258 [main] INFO  o.e.jetty.server.ServerConnector - Started ServerConnector@7ad78ab8{HTTP/1.1}{localhost:7474}
  13:50:12.708 [main] INFO  o.e.jetty.server.ServerConnector - Started ServerConnector@3f9c4b9a{SSL-HTTP/1.1}{localhost:7473}
  13:54:42.617 [qtp808144526-41] WARN  o.e.jetty.servlet.ServletHandler - /db/manage/server/monitor/fetch
  javax.ws.rs.WebApplicationException: javax.ws.rs.WebApplicationException: org.eclipse.jetty.io.EofException
      at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:174) ~[neo4j-server-2.0.1.jar:2.0.1]
      at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71) ~[jersey-core-1.9.jar:1.9]
      at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57) ~[jersey-core-1.9.jar:1.9]
      at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) ~[jersey-server-1.9.jar:1.9]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet-3.0.0.v201112011016.jar:na]
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698) ~[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506) ~[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112) ~[neo4j-server-2.0.1.jar:2.0.1]
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1477) ~[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) [jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:211) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1096) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432) [jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1030) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.Server.handle(Server.java:445) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:268) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) [jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) [jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) [jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815]
      at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
  Caused by: javax.ws.rs.WebApplicationException: org.eclipse.jetty.io.EofException
      at org.neo4j.server.rest.repr.formats.StreamingJsonFormat$StreamingRepresentationFormat.flush(StreamingJsonFormat.java:401) ~[neo4j-server-2.0.1.jar:2.0.1]
      at org.neo4j.server.rest.repr.formats.StreamingJsonFormat$StreamingRepresentationFormat.complete(StreamingJsonFormat.java:389) ~[neo4j-server-2.0.1.jar:2.0.1]
      at org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:43) ~[server-api-2.0.1.jar:2.0.1]
      at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:160) ~[neo4j-server-2.0.1.jar:2.0.1]
      ... 30 common frames omitted
  Caused by: org.eclipse.jetty.io.EofException: null
      at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:186) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:335) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:125) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpConnection$ContentCallback.process(HttpConnection.java:784) ~[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:79) ~[jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:356) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:631) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:661) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:151) ~[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815]
      at com.sun.jersey.spi.container.servlet.WebComponent$Writer.flush(WebComponent.java:315) ~[jersey-server-1.9.jar:1.9]
      at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.flush(ContainerResponse.java:145) ~[jersey-server-1.9.jar:1.9]
      at org.codehaus.jackson.impl.Utf8Generator.flush(Utf8Generator.java:1091) ~[jackson-core-asl-1.9.7.jar:1.9.7]
      at org.neo4j.server.rest.repr.formats.StreamingJsonFormat$StreamingRepresentationFormat.flush(StreamingJsonFormat.java:397) ~[neo4j-server-2.0.1.jar:2.0.1]
      ... 33 common frames omitted
  </code></pre>