Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weblogic increase memory

How do I increase the memory used by my Weblogic (Java). While starting the server from eclipse it shows a message that JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=256m. I couldn't understand from where is it taking that value from. After sometime the Weblogic server fails because of low permgen space.

I added startup arguments from console but that doesn't have any effect. Can you help me from where is it taking the memory values from?

like image 479
Akhil K Nambiar Avatar asked Nov 08 '13 10:11

Akhil K Nambiar


3 Answers

When you configure a "Server" in Eclipse for WebLogic, you select a domain directory (for local). That domain directory contains the startup scripts that Eclipse will use to start the WebLogic Server. These are the same scripts that you would use if you started the server if you did it without Eclipse. Inside the domain directory is a folder called "bin". In the "bin" directory, locate the setDomainEnv file (.sh for unix, or .cmd for Windows). In that file, alter the memory settings to suite your needs.

Based on the error message you mentioned in your question, I would increase both the PermSize and MaxPermSize settings to 512m. For PermSize and MaxPermSize, there are two locations each by default in a simple WLS installation, one for 32-bit, and another for 64-bit. It won't hurt to change them both. But if you know which JVM architecture you are running, you can change the one that applies to your environment.

like image 176
Derek Avatar answered Oct 18 '22 01:10

Derek


You will have a file setDomainEnv.cmd/setDomainEnv.sh under your server bin folder. this file contains

 set MEM_MAX_PERM_SIZE_64BIT=-XX:MaxPermSize=512m

set MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=512m

Max and Min memory values as

if "%JAVA_VENDOR%"=="Sun" (
    set WLS_MEM_ARGS_64BIT=-Xms256m -Xmx512m
    set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m
) else (
    set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx512m
    set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m
)

You can update the values inside it.

like image 6
Siva Avatar answered Oct 17 '22 23:10

Siva


In addition to the previous two answers that are correct (modifying setDomainEnv and potentially wl_server\common\bin\commEnv), you can also modify servers individually if you are starting them with the nodemanager.

In the admin console navigate to:

Servers -> <server name> -> Server Start tab -> Arguments

Here you can set the JVM args you want for that server rather than making a blanket change in all servers to setDomainEnv

like image 3
Display Name is missing Avatar answered Oct 18 '22 01:10

Display Name is missing