Out of Memory issue while using Lettuce 3.x

258 views
Skip to first unread message

hetalh...@gmail.com

unread,
May 8, 2019, 1:52:03 PM5/8/19
to lettuce-redis-client-users
I am using Lettuce 3.x that occasionally throws OutOfMemory errors while using LatencyUtils class. Here is the Heap dump trace.

Class Name                                                            | Shallow Heap | Retained Heap
-----------------------------------------------------------------------------------------------------
org.LatencyUtils.SimplePauseDetector @ 0x3c4e36fd0                    |           80 | 3,828,661,568
|- <class> class org.LatencyUtils.SimplePauseDetector @ 0x3c4b13a28   |           24 |            24
|- highPriorityListeners java.util.ArrayList @ 0x3c4e37020            |           24 |       559,776
|- normalPriorityListeners java.util.ArrayList @ 0x3c4e37038          |           24 | 3,548,415,056
|  |- <class> class java.util.ArrayList @ 0x3c0a2f790 System Class    |           32 |            80
|  |- elementData java.lang.Object[70803] @ 0x3d7913170               |      283,232 | 3,548,415,032
|  |  |- <class> class java.lang.Object[] @ 0x3c0843868               |            0 |             0
|  |  |- [17] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fca0e80|           32 |       113,160
|  |  |- [16] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fca1b10|           32 |       113,160
|  |  |- [15] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fca27a0|           32 |       113,160
|  |  |- [14] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fceba58|           32 |       113,160
|  |  |- [13] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fcec6e8|           32 |       113,160
|  |  |- [12] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fd37638|           32 |       113,160
|  |  |- [11] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fd382c8|           32 |       113,160
|  |  |- [10] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fd38f58|           32 |       113,160
|  |  |- [9] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fd814a8 |           32 |       113,160
|  |  |- [8] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fd82138 |           32 |       113,160
|  |  |- [7] org.LatencyUtils.LatencyStats$PauseTracker @ 0x42fdcc700 |           32 |       113,160
-----------------------------------------------------------------------------------------------------

Any leads on how to get through this issue? 

Note that this happened only once and auto recovered after my service was restarted. I want to avoid the service outage in future due to this issue.

hetalh...@gmail.com

unread,
May 8, 2019, 3:14:41 PM5/8/19
to lettuce-redis-client-users
Will upgrading Lettuce to 4.2 or further help as LatencyUtils dependency is optional as quoted in the dependency compatibility matrix: https://github.com/lettuce-io/lettuce-core/wiki/Dependency-Compatibility-Matrix?

Mark Paluch

unread,
May 8, 2019, 6:11:40 PM5/8/19
to lettuce-redis-client-users
Lettuce 3.x is out of support for 3 years.

Please upgrade to Lettuce 5.1.6 which is the latest version. Removing LatencyUtils will no longer spin up SimplePauseDetector so you should not see any heap being occupied by it.

Cheers, 
Mark
Reply all
Reply to author
Forward
0 new messages