Neo4j崩溃管道错误

时间:2014-04-28 21:09:32

标签: neo4j py2neo

我的Neo4j服务器崩溃了(v.2.0.1)。我使用py2neo运行批量插入,它突然崩溃了。

查看日志,我发现的唯一一件事是重复发生的错误:

00:33:32.907 [qtp1626072746-2055] 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$StreamingListWriter.writeValue(StreamingJsonFormat.java:316) ~[neo4j-server-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.ListWriter.writeValue(ListWriter.java:75) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.ValueRepresentation.addTo(ValueRepresentation.java:49) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:65) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.webadmin.rest.representations.RrdDataRepresentation$1.serialize(RrdDataRepresentation.java:68) ~[neo4j-server-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:40) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.MappingSerializer.putMapping(MappingSerializer.java:56) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.MappingRepresentation.putTo(MappingRepresentation.java:57) ~[server-api-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.ObjectRepresentation$PropertyGetter.putTo(ObjectRepresentation.java:133) ~[neo4j-server-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.ObjectRepresentation.serialize(ObjectRepresentation.java:144) ~[neo4j-server-2.0.1.jar:2.0.1]
    at org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41) ~[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.completeWrite(WriteFlusher.java:400) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
    at org.eclipse.jetty.io.SelectChannelEndPoint.onSelected(SelectChannelEndPoint.java:111) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processKey(SelectorManager.java:498) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:455) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
    at org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:420) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
    ... 3 common frames omitted
Caused by: java.io.IOException: Broken pipe
    at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[na:1.7.0_51]
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[na:1.7.0_51]
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:1.7.0_51]
    at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.7.0_51]
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487) ~[na:1.7.0_51]
    at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:165) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815]
    ... 8 common frames omitted

这是控制台中的最后一条消息,我在所有日志中都找不到任何其他错误。

编辑:

现在我可以重新创建崩溃了。我正在运行以下代码:

    qStr = "match (it:Item) match (it)-[r]->(pr:Property) where NOT has(r.rank) return r"
    query = neo4j.CypherQuery(self.graph_db,qStr)
    count = 0
    for record in query.stream():
        count =count +1
        self.batch.set_property(record[0],"rank", 10)
        if count > 500 :
            self.batch.submit()
            print record[0]
            count = 0
            self.batch.clear()

1000条记录后总是崩溃。错误与上述相同。我有neo4j-gc.log - 没什么特别的,没有声明错误。

1 个答案:

答案 0 :(得分:0)

这看起来像服务器没有响应。你的批量请求有多大?你有它的代码,你可以可靠地重新创建吗?