I get teh following error when starting the server
18-Jul-2017 15:16:15.157 SEVERE [http-nio-80-exec-8] org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
I messed with the setenv.bat still no better
set CATALINA_OPTS=-Xms8192m -Xmx8192m -XX:+UseG1GC %CATALINA_OPTS%
Server 2012r2 4 proc 8gb mem
Java 8, which is used with later Confluence versions, does not need the metaspace setting, and if it is present it can cause issues.
If you are starting Confluence as a service the settings in setenv.bat are ignored. If you have 8g RAM on the machine, please don't allocate all of it to Java as some needs to be available for the operating system.
It's probably more complex than just settings.
The metaspace is a memory space Java loads classes into so it can use them. In theory, it will drop most (but not all) classes out if they go unused long enough. Running out of metaspace essentially means it's not able to drop enough classes out to let new ones in to be used.
You could do something like -XX:MaxMetaspaceSize=512m , but that could actually make it fall over faster, because the default metaspace maximum is "all the memory for the JVM". It might also massively increase swapping (swapping is bad, it slows things down by 10s or 100s of times) or just lead to other out of memory errors in different parts of the memory as it chews up the space it can.
You could try increasing the overall memory for the JVM, but if you've got classes just chewing it up, all that will do is prolong it.
What you need to do is find out what classes are causing the problem. A clean Confluence on its own is unlikely to be at fault because if it were, Atlassian would have been screamed at by so many clients, they'd have pulled the release. It's far more likely to be an add-on or an unusual usage (for example, increasing the attachment limit to a couple of Gb and then using it. I don't think that does actually break it now, but you see what I'm getting at)
I'd be looking at "safe mode" and the logs next, but, I've just typed all of that and suddenly realised there may be another problem.
In your question, you set the minimum and maximum memory for the JVM to 8192Mb. Your server has 8Gb available. You do need to allow the OS some working space! A general rule - make sure the service settings set the maximum memory to at least 2Gb LESS than the server physical memory
JIRA applications crash due to OutOfMemoryError Metaspace offers these suggestions:
Here are intructions to change the properties of the Windows service, either by command line or editing the registry.
Is it the case that you cannot start Confluence because of the metaspace error or you can start it but want to eliminate the error?
Nic mentioned Safe Mode, you could enable it and see if the errors are reduced or eliminated, however, I am not sure how long you would need to stay in safe mode to determine that a plugin is causing the issue because I am not sure how frequently you are seeing the error. Disabling or enabling all add-ons (using Safe Mode)
Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs