-XX:MaxPermSize with or without -XX:PermSize

We’ve run into a Java.lang.OutOfMemoryError: PermGen space error and looking at the tomcat JVM params, other than the -Xms and -Xmx params we also specify -XX:MaxPermSize=128m. After a bit of profiling I can see occasionally garbage collection happening on the PermGen space saving it from running full. My question is: other than increasing the -XX:MaxPermSize … Read more

wrong ELF class: ELFCLASS32

Based on the conversation in the other answer, it was inferred that the JVM was a 64-bit process. This was confirmed using the pflags command in Solaris. Apparently the -d32 flag passed to the JVM was being ignored. This was due to the possibility of the JVM being a 64-bit one, which was incapable of operating in the 32-bit mode. … Read more

Why cannot the JVM auto expand heap memory to the configured Xmx3072m in linux & jdk1.6.0_32, and FullGC occurs very frequently

The RES value isn’t how much memory the process is using, but how much actual RAM it uses. This doesn’t include swapped pages and allocated but unmapped pages. Make sure you have enough free memory on the system itself, you can run free, or even top should print above how much memory is in use. The output of top suggests that the … Read more

How do I use the JAVA_OPTS environment variable?

JAVA_OPTS is the standard environment variable that some servers and other java apps append to the call that executes the java command. For example in tomcat if you define JAVA_OPTS=’-Xmx1024m’, the startup script will execute java org.apache.tomcat.Servert -Xmx1024m If you are running in Linux/OSX, you can set the JAVA_OPTS, right before you call the startup script by doing This will … Read more

How do I set the proxy to be used by the JVM

From the Java documentation (not the javadoc API): http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html Set the JVM flags http.proxyHost and http.proxyPort when starting your JVM on the command line. This is usually done in a shell script (in Unix) or bat file (in Windows). Here’s the example with the Unix shell script: When using containers such as JBoss or WebLogic, my solution is to edit … Read more