Foren

Memory leak, or normal memory usage for SelectableConcurrentHashMap

Paul Cahill, geändert vor 6 Jahren.

Memory leak, or normal memory usage for SelectableConcurrentHashMap

New Member Beiträge: 12 Beitrittsdatum: 02.09.16 Neueste Beiträge
Hi all,

We are running into a "java.lang.OutOfMemoryError: Java heap space" error once per day with our Liferay installation. Max memory pool is set to 1024MB.

Running an analysis of the heap dump using Eclipse MAT shows two top leak suspects as seen below.

Is this typical of Liferay, or is this a memory leak?

Thanks for the input!

Paul

Problem Suspect 1

One instance of "net.sf.ehcache.store.chm.SelectableConcurrentHashMap" loaded by "com.liferay.portal.cache.ehcache.provider" occupies 229,102,048 (26.77%) bytes. The memory is accumulated in one instance of "net.sf.ehcache.store.chm.SelectableConcurrentHashMap$Segment[]" loaded by "com.liferay.portal.cache.ehcache.provider".

Problem Suspect 2

One instance of "net.sf.ehcache.store.chm.SelectableConcurrentHashMap" loaded by "com.liferay.portal.cache.ehcache.provider" occupies 91,815,008 (10.73%) bytes. The memory is accumulated in one instance of "net.sf.ehcache.store.chm.SelectableConcurrentHashMap$Segment[]" loaded by "com.liferay.portal.cache.ehcache.provider".
thumbnail
David H Nebinger, geändert vor 6 Jahren.

RE: Memory leak, or normal memory usage for SelectableConcurrentHashMap

Liferay Legend Beiträge: 14915 Beitrittsdatum: 02.09.06 Neueste Beiträge
Paul Cahill:
We are running into a "java.lang.OutOfMemoryError: Java heap space" error once per day with our Liferay installation. Max memory pool is set to 1024MB.


This is a ridiculously low memory setting. The default bundle has this only because it doesn't have any real data or content. No installation I've ever worked on has been able to live in a 1g memory partition.

Update you settings to 4g or more; the error will go away and all will be fine.








Come meet me at the 2017 LSNA!
Paul Cahill, geändert vor 6 Jahren.

RE: Memory leak, or normal memory usage for SelectableConcurrentHashMap

New Member Beiträge: 12 Beitrittsdatum: 02.09.16 Neueste Beiträge
Thanks! Will give that a go.