Getting metaspace errors, or blank pages that end up being related to this? Don’t tweak the maxmetaspace: remove it!
Have you been annoyed to find CF failing with outofmemory errors referring to “outofmemoryerror: metaspace”, or more simply just “metaspace”. Or you may get strange cases of CF pages simply “returning blank”, and if you look into CF’s coldfusion-error.log file, you may see this metaspace error appearing then.
You may google the problem and find folks helpfully suggesting that you increase CF’s JVM argument related to this, -XX:MaxMetaspaceSize. I will suggest instead that for most folks you should simply REMOVE this argument. Most folks simply don’t need this set, but Adobe sets it for us to a small default value, for reasons related to previous Java versions.
If you want to find out more on why I suggest removing it, how to do it safely, and more, see the blog post on my own site with much more information, here:
I also offer there a link to a bug report where I make the case that Adobe should also stop setting this value for us.
Finally, I address as well the question of whether one might ever WANT to set a higher value, as well as how to MONITOR the use of metaspace, and more.