Server memory Modifications
The memory configuration methods for each application server are different, as listed below are the JVM parameter (-XMS,-XMX) configuration methods for common servers.
JVM parameter definitions:
-Xms: Initialize memory size
-XMX: Maximum memory that can be used
Sample Tools
The following sample tools: report Development Tools Finereport
Tomcat Server memory modification
1. Description of the problem
Java applications run with the memory of the Web application server, such as data obtained from the execution of the report, intermediate data for the operation, etc., which need to be persisted in server memory.
A memory overflow error occurs when no empty memory is available: Java.lang.OutOfMemoryError:Java Heap Space .
2. Solution
In order to avoid memory overflow problem, we should enable the disk cache appropriately, on the other hand can adjust the server memory size according to the actual situation.
Here's how to adjust the server memory size.
decompression version through start.bat start tomcat
in the Windows system, locate the %tomcat_home%/bin/catalina.bat To edit the file.
Find this line of code:
1. REM-----Execute The requested Command---------------------------------------
under which to add
1. set java_opts=-xms256m-xmx512m
Ms represents the initial memory size, MX represents the largest, the above code meaning is initialized when the memory is set to 256m, the maximum memory is 512m
For a tomcat server, the maximum memory is generally not more than 80% of the physical memory.
Modify the same directory under Catalina.sh in Linux, and modify it the same way.
· The installation version starts Tomcat through the service
If you are booting with the Tomcat service, you will need to modify the registry in Hkey_local_machine/software/apache software Fountdation/procrun 2.0/parameters It corresponds to modifying Java Jvmms and JVMMX.
Note: Please modify the registry carefully.
Weblogic Server memory Modifications
1. Description of the problem
The memory of the Web application server is used during the running of the program, such as the data obtained from the execution of the report, intermediate data of the operation, etc., which need to be persisted in server memory.
If there is an overflow in memory, an error will be made.
2. Solution
the WebLogic server is modified by thebea\user_projects\domains\The startweblogicnand file in the corresponding project directory, such asC:\bea\user_projects\domains\base_domain\ Startweblogicnandto configure the WebLogic server virtual memory.
2.1 In Weblogic8.1
edit Startweblogicnand, add a row on set server_nameSet mem_args=-xms256m-xmx512m; and increased in the classpath;%mem_args%, save can
2.2 In WEBLOGIC10
in the Startweblogicnand fileCall "%domain_home%\bin\startweblogicnand"%*AddSet mem_args=-xms256m-xmx512m, you can save it, such as:
Websphere Server memory modification
1. Description of the problem
Java applications run with the memory of the Web application server, such as data obtained from the execution of the report, intermediate data for the operation, etc., which need to be persisted in server memory.
A memory overflow error occurs when no empty memory is available.
2. Solution
WebSphere Server memory modifications are hidden more deeply, Management Console | server | process Definition | The Java Virtual machine is set up. This takes websphere6 as an example to illustrate:
OpenManagement Console | server | Application ServerSelect Server, here isServer1:
Click java and Process management | process Definition :
Click Java Virtual Machine :
You can set the JVM parameters, set up OK and Save:
JBoss Server Memory Modification
. Problem description
Java applications run with the memory of the Web application server, such as data obtained from the execution of the report, intermediate data for the operation, etc., which need to be persisted in server memory.
A memory overflow error occurs when no empty memory is available.
2. Solution
JBoss Server memory modifications are simpler, such as Jboss4.2, by simply %jboss_home%\bin\ The corresponding memory parameters in the Run.bat file below are set to the desired values, such as:
Multiple report server memory modification methods for report performance optimization scenarios