neo4j-server.properties
org.neo4j.server.webserver.maxthreads=1000
neo4j.properties
execution_guard_enabled=true
我的代码:
for (int i = 0; i < 100000; i++) {
try (Transaction tx = service.beginTx();) {
// do somthing
tx.success();
tx.close();
}catch(Exception ex){
throw ex;
}
}
运行大约3个小时,发生GuardTimeoutException如下:
org.neo4j.kernel.guard.GuardTimeoutException: timeout occured (overtime=2)
at org.neo4j.kernel.guard.Guard$Timeout.check(Guard.java:128)
at org.neo4j.kernel.guard.Guard.check(Guard.java:42)
at org.neo4j.kernel.impl.api.GuardingStatementOperations.nodeGetRelationships(GuardingStatementOperations.java:357)
at org.neo4j.kernel.impl.api.OperationsFacade.nodeGetRelationships(OperationsFacade.java:352)
at org.neo4j.kernel.impl.core.NodeProxy$2.iterator(NodeProxy.java:194)
at org.neo4j.kernel.impl.core.NodeProxy$2.iterator(NodeProxy.java:186)
at com.xxx.neo4j.plugin.knitter.service.KnitterService.setInvestFrom(KnitterService.java:389)