如何分类问题,如"交易已自动回滚"

时间:2016-03-17 12:17:45

标签: neo4j

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

  

2016-03-17 19:23:23.027 + 0800 INFO ID为111745的交易已自动回滚。

然后我搜索了谷歌并发现了与https://groups.google.com/forum/#!msg/neo4j/3h-_PCrb6p4/TB1vt2RhDgAJ类似的症状。但是,该文章中提到的方法对我的案例并不起作用。在第一次"事务回滚后,我的案例中的GC日志中甚至没有输出"在console.log中打印的消息

所以我想咨询一下我可以对此问题进行分类的其他方式吗?

我的服务器硬件配置是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.

neo4j-gc.log 的文件结束(最后一次gc输出是19:12:12,事务回滚开始于19:23:23,不确定这是否正常)

2016-03-17T19:12:06.895+0800: 2931.231: Total time for which application threads were stopped: 0.0440391 seconds
2016-03-17T19:12:12.593+0800: 2936.929: [GC pause (G1 Evacuation Pause) (young)
Desired survivor size 322961408 bytes, new threshold 15 (max 15)
- age   1:   42475792 bytes,   42475792 total
- age   2:    3366440 bytes,   45842232 total
- age   3:     322992 bytes,   46165224 total
- age   4:     496416 bytes,   46661640 total
- age   5:     127752 bytes,   46789392 total
- age   6:     505248 bytes,   47294640 total
- age   7:     448920 bytes,   47743560 total
- age   8:     229736 bytes,   47973296 total
- age   9:      84472 bytes,   48057768 total
- age  10:     171480 bytes,   48229248 total
- age  11:     239840 bytes,   48469088 total
- age  12:      90808 bytes,   48559896 total
- age  13:     180872 bytes,   48740768 total
- age  14:     384056 bytes,   49124824 total
- age  15:     252528 bytes,   49377352 total
, 0.0441110 secs]
   [Parallel Time: 39.3 ms, GC Workers: 4]
      [GC Worker Start (ms): Min: 2936928.9, Avg: 2936928.9, Max: 2936928.9, Diff: 0.0]
      [Ext Root Scanning (ms): Min: 0.8, Avg: 1.0, Max: 1.5, Diff: 0.7, Sum: 4.0]
      [Update RS (ms): Min: 3.8, Avg: 4.3, Max: 4.5, Diff: 0.6, Sum: 17.2]
         [Processed Buffers: Min: 24, Avg: 29.8, Max: 35, Diff: 11, Sum: 119]
      [Scan RS (ms): Min: 0.5, Avg: 0.6, Max: 0.7, Diff: 0.1, Sum: 2.3]
      [Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
      [Object Copy (ms): Min: 33.2, Avg: 33.2, Max: 33.3, Diff: 0.1, Sum: 133.0]
      [Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
      [GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.1, Diff: 0.0, Sum: 0.2]
      [GC Worker Total (ms): Min: 39.1, Avg: 39.2, Max: 39.2, Diff: 0.0, Sum: 156.6]
      [GC Worker End (ms): Min: 2936968.1, Avg: 2936968.1, Max: 2936968.1, Diff: 0.0]
   [Code Root Fixup: 0.4 ms]
   [Code Root Migration: 0.1 ms]
   [Code Root Purge: 0.0 ms]
   [Clear CT: 0.6 ms]
   [Other: 3.7 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 2.1 ms]
      [Ref Enq: 0.2 ms]
      [Redirty Cards: 0.1 ms]
      [Free CSet: 0.9 ms]
   [Eden: 4856.0M(4856.0M)->0.0B(4856.0M) Survivors: 56.0M->56.0M Heap: 5394.6M(8192.0M)->539.7M(8192.0M)]
 [Times: user=0.16 sys=0.00, real=0.05 secs]

我在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

0 个答案:

没有答案