Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to analyze OutOfMemoryError and StackOverFlowError

Shulou Source: shulou.com Published: 2022-05-31 23:02:41 09月18日 Update

This article will explain in detail how to analyze OutOfMemoryError and StackOverFlowError. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Recently, when I was doing data statistics with kettle, I encountered the problem mentioned in the title, and the solution was simple, but I still need to explain it.

Although both of these are memory overflows, there is a distinction. OutOfMemoryError means heap overflow and StackOverFlowError means stack overflow. Generally, the former is more common, and the latter is less common, unless you use a deep loop. In general, the default value of stack is 128k~256k, which is large enough and does not need to be modified, but you need to modify big data's deep cycle.

StackOverFlowError modification method

-Xss1024m

OutOfMemoryError modification method

-Xmx3072m

Just add these two to the environment variable setting of JVM

This is the end of the analysis on how to carry out OutOfMemoryError and StackOverFlowError. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Situation method analysis two content data article more depth knowledge article loop good no memory variable enough data statistics title environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux Xiaomi vpn Docker