Score:0

JVM (lucee) Metaspace increases constantly

in flag

I have a lucee (ColdFusion) server in production.

At first, we encountered OS memory exhaustion. We reduced the -Xmx2048m to half available memory and set -XX:MaxMetaspaceSize=1000m.

After a while though, the tomcat of lucee reported OutOfMemory errors and required a restart.

Since the metaspace is in addition to the heap and by default is not limited, this indicates that the metaspace is filling up.

I have then added a regular jcmd <pid> VM.metaspace to verify this assumption. In the morning, I have:

 garbage-first heap   total 1572864K, used 959885K [0x0000000080000000, 0x0000000100000000)
  region size 1024K, 249 young (254976K), 18 survivors (18432K)
 Metaspace       used 99985K, capacity 102839K, committed 104996K, reserved 1114112K
  class space    used 7301K, capacity 8154K, committed 8320K, reserved 1015808K

and in the evening:

 garbage-first heap   total 1616896K, used 556546K [0x0000000080000000, 0x0000000100000000)
  region size 1024K, 25 young (25600K), 5 survivors (5120K)
 Metaspace       used 108125K, capacity 111035K, committed 113828K, reserved 1122304K
  class space    used 7509K, capacity 8463K, committed 8704K, reserved 1015808K

So metaspace is growing by about 8Mb per day !

I had found that JAXB had an issue that cause this behavior, so I tried that walkaround by adding -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true but it didn't help or maybe made it worse.

How can I find out what the heck is filling up my metaspace ?

Score:0
co flag

I have yet to find a solution to this, but there is an open ticket for it.I am currently having to restart my server periodically to prevent a crash.

Please see

https://luceeserver.atlassian.net/browse/LDEV-2904

and

https://dev.lucee.org/t/lucee-5-3-5-92-java-non-heap-memory-steadily-increases/6948/23

djdomi avatar
za flag
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/501900)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.