Coolx World - Programming
Eclipse Memory Analyzer (MAT) (Java)
2017-12-11 11:16 - swindler
java memory dump 파일을 분석하는 툴중에서
eclipse memory analyzer를 많이 사용한다.

일반적으로 dump 파일 용량이 크기 때문에,
MemoryAnalyzer.ini 파일의 옵션을 수정해야 한다.

-Xmx1024m 이런 부분을
-Xmx2048m 와 같이 수정한다거나...



아래와 같은 사례가 있는데, 아직 적용해보지 않았음.


Tomcat는, 큰 JSP의 페이지를 리퀘스트 하면 메모리 leak 되어 버립니다.
이것을 피하기 위해서, bin/setenv.sh를 다음과 같이 설정해 주세요.

export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true"

?Bug 37793 ? org.apache.jasper.runtime.BodyContentImpl doesn't reset the 'cb' character array, causes memory leak


[#JRA-10145] Set tomcat flag to not re-use buffers, as they result in OutOfMemoryErrors - Atlassian JIRA

아무래도, Tomcat 은 버퍼를 재이용하는 구조가 있는 것 같아서,
매우 큰 컨텐츠를 출력하면 버퍼로 heap가 넘쳐 버리는 것 같습니다.
이 버퍼를 무진장하게 늘리지 않기 위한 옵션이 LIMIT_BUFFER군요.
Copyright © 1999-2020, swindler.

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog