Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Neo4j 如何分类问题,例如;交易记录已自动回滚”;_Neo4j - Fatal编程技术网

Neo4j 如何分类问题,例如;交易记录已自动回滚”;

Neo4j 如何分类问题,例如;交易记录已自动回滚”;,neo4j,Neo4j,我正在为neo4j运行一个专用服务器,以提供REST服务API。但发现运行一段时间后,响应突然变慢,即使我们保持相同的并发计数。所以我检查了console.log,在某个时间段后发现了许多相同的消息: 2016-03-17 19:23:23.027+0800 id为111745的信息交易已自动回滚 然后我搜索了谷歌,发现了与之类似的症状。然而,那篇文章中提到的方法在我的案例中不起作用。在console.log中打印第一条“transaction Rollback”消息之后,我的案例的GC日志中甚

我正在为neo4j运行一个专用服务器,以提供REST服务API。但发现运行一段时间后,响应突然变慢,即使我们保持相同的并发计数。所以我检查了console.log,在某个时间段后发现了许多相同的消息:

2016-03-17 19:23:23.027+0800 id为111745的信息交易已自动回滚

然后我搜索了谷歌,发现了与之类似的症状。然而,那篇文章中提到的方法在我的案例中不起作用。在console.log中打印第一条“transaction Rollback”消息之后,我的案例的GC日志中甚至没有输出

因此,我想咨询一下是否有其他方法可以对这个问题的根本原因进行分类?

我的服务器硬件配置是4CPU双核,32G RAM。数据库文件大小为:

neostore.nodestore.db: 800M byte
neostore.propertystore.db: 4G byte
neostore.relationshipstore.db: 2G byte
neo4j设置如下所示:

dbms.pagecache.memory=16g
wrapper.java.initmemory=8192
wrapper.java.maxmemory=8192
console.log示例:

2016-03-17 18:23:23.003+0800 INFO  Successfully started database
2016-03-17 18:23:23.027+0800 INFO  Starting HTTP on port 7474 (100 threads available)
2016-03-17 18:23:23.182+0800 INFO  Enabling HTTPS on port 7473
2016-03-17 18:23:23.240+0800 WARN  Acceptors should be <= availableProcessors: ServerConnector@4a4e2faa{HTTP/1.1}{0.0.0.0:0}
2016-03-17 18:23:23.254+0800 WARN  Acceptors should be <= availableProcessors: ServerConnector@618f7e63{SSL-HTTP/1.1}{0.0.0.0:0}
2016-03-17 18:23:23.272+0800 INFO  Mounting static content at /webadmin
2016-03-17 18:23:23.313+0800 INFO  Mounting static content at /browser
TeeFilter will be ACTIVE on this host [test_yaliceshi]
...
TeeFilter will be ACTIVE on this host [test_yaliceshi]
2016-03-17 18:23:24.397+0800 INFO  Remote interface ready and available at http://0.0.0.0:7474/
2016-03-17 19:23:23.027+0800 INFO  Transaction with id 111745 has been automatically rolled back.
2016-03-17 19:23:23.028+0800 INFO  Transaction with id 111747 has been automatically rolled back.
2016-03-17 19:23:23.028+0800 INFO  Transaction with id 111749 has been automatically rolled back.
2016-03-17 19:23:23.028+0800 INFO  Transaction with id 111748 has been automatically rolled back.
2016-03-17 19:23:23.028+0800 INFO  Transaction with id 111758 has been automatically rolled back.
2016-03-17 19:23:23.029+0800 INFO  Transaction with id 111763 has been automatically rolled back.
2016-03-17 19:23:23.029+0800 INFO  Transaction with id 111762 has been automatically rolled back.
2016-03-17 19:23:23.030+0800 INFO  Transaction with id 111764 has been automatically rolled back.
2016-03-17 19:23:23.030+0800 INFO  Transaction with id 111767 has been automatically rolled back.
2016-03-17 19:23:23.030+0800 INFO  Transaction with id 111771 has been automatically rolled back.
2016-03-17 19:23:23.030+0800 INFO  Transaction with id 111773 has been automatically rolled back.
我在19:23:23左右检查了http.log,发现404错误,在19:12:22和19:23:23之间没有http请求,这是有线的:

188.188.33.66 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction/111715/commit HTTP/1.1" 200 26 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 270
188.188.41.35 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 23
188.188.33.66 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 20
188.188.41.35 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction/111738/commit HTTP/1.1" 200 26 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 30
188.188.33.66 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 22
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 281 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 661943
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 1131 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 661771
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 662613
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 4156 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 676326
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111741/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 8
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111731/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 0
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111723/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 1
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111745/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 0

你能确定RESTAPI的哪个请求失败了吗?@ChristophenWillemsen我检查了http.log,发现了一些东西,但是太长了,无法发表评论,所以我把它们添加到了原始帖子的末尾。请看它是否有用。似乎有很多事务已打开,但从未实际提交,您能检查一下如何使用您的事务吗?您是否处理py2neo客户端的错误?我的意思是,如果发送失败,py2neo将发出警告,您应该将其记录在某个地方?在我的应用程序日志中,有两种py2neo错误:死锁和Http404。关于死锁,它在测试开始时经常发生,但这是意料之中的,因为我们的测试数据非常特殊。我们通过睡眠0.5s来处理它,然后重试。关于Http404,第一个发生在19:23:23,所以我认为这与tx回滚的原因相同。顺便说一下,我检查了我的应用程序日志,它在19:12:22发送create node cypher,然后在19:23:23等待util http404,所以它们之间没有请求@克里斯托弗·威伦森
188.188.33.66 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction/111715/commit HTTP/1.1" 200 26 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 270
188.188.41.35 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 23
188.188.33.66 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 20
188.188.41.35 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction/111738/commit HTTP/1.1" 200 26 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 30
188.188.33.66 - - [17/Mar/2016:19:12:22 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 22
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 281 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 661943
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 1131 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 661771
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 406 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 662613
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction HTTP/1.1" 201 4156 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 676326
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111741/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 8
188.188.33.66 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111731/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.11-final-0 (linux2)" 0
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111723/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 1
188.188.41.35 - - [17/Mar/2016:19:23:23 +0800] "POST /db/data/transaction/111745/commit HTTP/1.1" 404 168 "-" "py2neo/2.0.8 HTTPStream/1.5.0 Python/2.7.6-final-0 (linux2)" 0