Search code examples
javaweblogic12cjvm-arguments

Setting heap size through WebLogic console in Server start arguments does not reflect the heap size


I have set heap size in the WebLogic console server start JVM arguments as -Xms1024m -Xmx1024m. But at setDomainEnv.sh level it is -Xms256m -Xmx512m.

When I am starting the managed server, the heap size allocation is according to the setDomainEnv.sh and not according to my args. Can you explain how setDomainEnv takes precedence over the args and what should I do to start the JVM with the heap size mentioned in the server start arguments?

I have tried putting it in startManagedWeblogic.sh file and making StartScriptEnabled at nodemanger=false too. But nothing worked out.


Solution

  • You could just edit the values inside setDomainEnv. The name stands for "set domain environment", so that's where your environment configuration settings should be. You can even find such a suggestion in the Oracle documentation: https://docs.oracle.com/cd/E40518_01/server.761/es_install/src/tins_postinstall_jvm_heap.html

    Customizing the WebLogic JVM heap size

    You can change the default JVM heap size to fit the needs of your deployment.

    The default JVM heap size for WebLogic is 3GB. The size is set in the setDomainEnv.sh file for Linux or setDomainEnv.cmd for Windows, which is in the $DOMAIN_HOME/bin directory. The heap size is set with the -Xmx option.