Optimize JVM memory to solve outofmemoryerror
From the VM specification, we can see several exceptions.Java. Lang. stackoverflowerror :( very few)Java. Lang. outofmemoryerror: heap space (common)Java. Lang. outofmemoryerror: permgen space (frequently seen)
The following are the most common examples:
Java. Lang. outofmemoryerror
Permgen space is a common exception. It refers to the exception
I. Diagram of the Java Technical System Module
Ii. JVM memory Zone Model
1. Method Area
It is also called "permanent generation" and "non-heap". It is used to store class information, constants, static variables, and memory areas shared by various threads. The default value is 16 MB and the maximum value is 64 MB. You can use the-XX: permsize and-XX
What is 1.JVM? Jvm:java virtual mechinal (Java vm). It is a fictional computer that is implemented by simulating various functions on a real computer. The main task of the JVM is to interpret its own set of instructions (bytecode, such as Java source code compiled into a class file to run on a virtual machine) and map to a local CPU instruction set or system call to the OS. The essence of the cross-platfor
The phenomenon of suspended animation in Java services (such as the Web page cannot open, open a blank page, the speed of access to a dramatic decline), you need to engineer in the first time dump JVM memory data, to analyze the reason. So how do I get the JVM memory dump file?Execute under the CMD console or Linux ter
A brief introduction to the jvm runtime data zone #160; #160; #160; the memory managed by JVM is divided into the following runtime data zones: program counters, Java virtual machine stacks, local method stacks, Java stacks, and method zones. #160; #160; This article mainly involves: java virtual machine station (java stack), java heap, and method zone. #16
Summary after reading Java Virtual Machine
1) Sun HotSpot JVM Memory Model
2) Sun HotSpot JVM Memory Allocation
Iii) Sun HotSpot JVM memory monitoring
4) Sun HotSpot JVM garbage collect
Recently I have been familiar with a project that has been developed for several years. I need to port the database from MySQL to Oracle. First, I need to point the JDBC connection to MySQL and package it into tomcat to run it. There is no problem, however, when the JDBC connection is directed to Oracle, Tomcat continuously throws Java. lang. outofmemoryerror: I googled the Internet and learned about the running mechanism of Tomcat. I also solved the problem and shared it for future reference.
1
1.JVM run-time data region partitioningA. Procedure counter (program Counter Register)A small piece of memory space, which can be seen as the line number indicator of the byte code executed by the current thread. Each thread has a separate counter, and if the native method is currently executing, the counter value is empty. B.JVM Stack (Java Virtual machine Stack)Describes the
800x600 Normal 0 7.8 lb 0 2 false false en-US ZH-CN x-none
Eclipse set JVM memory in
Today, in Eclipse, when you test a document into a picture, the following error is reported:
Java.lang.OutOfMemoryError:Java Heap Space
As you can see from the above exception information, the JVM needs to use more memor
VM Run-time data region :The JVM includes the following runtime zones, as defined in the Java Virtual Machine Specification (second edition):Let's consider a few questions:How does the 1.jVM work?How is the 2.JVM runtime memory allocated?3. In what area do we write Java code (classes, objects, methods, constants, varia
Web services are always inexplicably run after a period of time after the JVM directly outofmemory error, memory leak problem is not easy to find, this article on some of the basic knowledge to find memory leaks to do a summary, does not involve a specific case analysis. 1 JVM Memo
Overview of the JDK1.8 JVM memory model
The JDK1.8 JVM memory model is described here. The biggest difference between 1.8 and 1.7 is that the metadata area replaces the permanent generation . The nature of the meta space and the permanent generation are similar to the implementation of the method area in the
Set JVM memory in EclipseThe following error was reported when testing the conversion of a document to a picture in eclipse today:
Java.lang.OutOfMemoryError:Java Heap Space
As you can see from the exception above, the amount of memory that the JVM needs to use exceeds the maximum
memory allocation and recall policyThe JVM's own active memory management has to proactively address two of issues: objects allocate memory and reclaim memory allocated to objects. The first few pieces of recycled memory have be
Eclipse set JVM memory inThe following error was reported when testing the conversion of a document to a picture in eclipse today:
Java.lang.OutOfMemoryError:Java Heap Space
As you can see from the exception above, the amount of memory that the JVM needs to use exceeds the maximum
JVM runtime data zone: the memory managed by JVM is divided into the following runtime data zones: Program counters, Java Virtual Machine stacks, local method stacks, Java stacks, and method zones. This article mainly involves: Java Virtual Machine station (java stack for short), Java heap and method area. Here, we will briefly popularize the knowledge of these t
JVM Memory Area Model1. Method AreaAlso known as " Permanent Generation", "non-heap", It is used to store virtual machine loaded class information, constants, static variables, is the memory area shared by each thread. The default minimum value is 16MBand themaximum value is 64MB, which can be -xx:permsize and -xx:maxpermsize parameter limits the size of the met
When you test a program that contains a large amount of data in Eclipse today, the following error is reported:
Java.lang.OutOfMemoryError:Java Heap Space
as you can see from the exception above, the amount of memory that theJVM needs to use exceeds the maximum memory we can allocate to the virtual machine. So the question turns into how to set the maximum
One: Java technology system module diagram II: JVM Memory Area model
1. Method Area
Also known as "permanent generation", "not heap", it is used to store virtual machine loaded class information, constants, static variables, is the memory area shared by each thread. The default minimum value is 16MB and the maximum is 64MB, and the size of the method area can be
Reprinted from: http://blog.csdn.net/zz87250976/article/details/42875301JVM memory is divided into four types:1, the stack area (stacksegment)-Automatically allocated by the compiler release, stored function parameter value, local variable value, etc., after the execution of the method, the system automatically frees the JVM memory resources;2. Heap area (heapseg
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.