-
Bug
-
Resolution: Fixed
-
Highest
-
6.4.1, 6.7.0
-
Severity 1 - Critical
-
The Lucene searcher pruner thread is responsible for cleaning up index snapshots that are used to ensure a consistent pagination when searching. This thread is created per Lucene connection (i.e. for each index). It is observed that sometime the thread crashes during a Confluence initialization so obsolete index snapshots aren't clean up and retain in memory after using, which causes a memory leak. This memory leak can lead to exhaustion of the heap space and eventual crash of Confluence.
The way to verify if this thread is alive is to take a thread dump and check if there is one pruner thread for each Lucene index. Usually you will see 2 threads one for main index and another for edge index. But a plugin like CQ maintains its own index in that case the number of pruner thread should be increased accordingly.
E.g.
[confluence@ip-vv-xx-yy-zz~]$ jstack $(pgrep java) | grep prune "lucene-tracked-searchers-pruner-pool-26-thread-1" #370 daemon prio=5 os_prio=0 tid=0x00007f3b644a0800 nid=0x867 waiting on condition [0x00007f3658966000] "lucene-tracked-searchers-pruner-pool-21-thread-1" #195 daemon prio=5 os_prio=0 tid=0x00007f3ab4bc8000 nid=0x75a waiting on condition [0x00007f3a5776e000] "lucene-tracked-searchers-pruner-pool-19-thread-1" #193 daemon prio=5 os_prio=0 tid=0x00007f3a70210000 nid=0x757 waiting on condition [0x00007f3a5804c000]
It is possible that this problem also occurs in earlier version of Confluence despite less frequently.