Skip to content

Latest commit

ย 

History

History
58 lines (35 loc) ยท 1.58 KB

OutOfMemory์—๋Ÿฌ.md

File metadata and controls

58 lines (35 loc) ยท 1.58 KB

OutOfMemory

Maven build ์‹œ FindBug Plugin์„ ํ•จ๊ป˜ build ํ•˜๋ฉด OutofMemory ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ.

๋ฌธ์ œ ํ™•์ธ

  • ๊ธฐ์กด Maven Build Goals (๋ฌธ์ œ ์—†์Œ) mavenBuild

  • Maven Goals ์— pmd, findbugs Build ์ถ”๊ฐ€ (OutOfMemory ๋ฐœ์ƒ) withFindBugBuild

  • Build ์ค‘์ธ console ์ฐฝ ํ™•์ธ
    ์ฝ˜์†”

  • OutOfMemory ๋ฐœ์ƒ
    findBug์—๋Ÿฌ

ํ•ด๊ฒฐ

Jenkins ์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•  ๋•Œ JVM ์˜ต์…˜์˜ Memory ํ• ๋‹น ๊ฐ’ ๋ณ€๊ฒฝ

  • start.bat ํŒŒ์ผ ๋ณ€๊ฒฝ
    CI์„œ๋ฒ„

  • JAVA_OPTS ๊ฐ’ ๋ณ€๊ฒฝ
    start_bat

Jenkins ์—์„œ Maven ๋นŒ๋“œ์‹œ Maven_OPTS ๋ฉ”๋ชจ๋ฆฌ ๊ฐ’ ์„ค์ •

  • Jenkins ๊ด€๋ฆฌ์—์„œ ์‹œ์Šคํ…œ ์„ค์ • ํ™•์ธ
    jenkins๊ด€๋ฆฌ

  • ์‹œ์Šคํ…œ ์„ค์ •์—์„œ Maven ์„ค์ • ๋ถ€๋ถ„ ํ™•์ธ (Maven Installations... ํด๋ฆญ) ์‹œ์Šคํ…œ๊ด€๋ฆฌ

  • Global MAVEN_OPTS ์— Maven ๋นŒ๋“œ ์‹œ ๋ฉ”๋ชจ๋ฆฌ ๊ฐ’ ์„ค์ •
    ์‹œ์Šคํ…œ๊ด€๋ฆฌ_Maven

Maven ๋นŒ๋“œ ์ค‘ Findbugs ๋นŒ๋“œ ์‹œ ๋ฉ”๋ชจ๋ฆฌ ๊ฐ’ ์„ค์ •

  • ๊ธฐ์กด findbugs-maven-plugin ์„ค์ •
    ๊ธฐ์กดPom

  • findbugs-maven-plugin ์„ค์ •์—์„œ maxHeap ๊ฐ’์„ ์ถ”๊ฐ€ํ•ด์„œ ๋ฉ”๋ชจ๋ฆฌ ์„ค์ •
    Pom๋ฉ”๋ชจ๋ฆฌ์ถ”๊ฐ€

๊ฒฐ๋ก 
์•„๋ž˜์™€ ๊ฐ™์ด ๋ฉ”๋ชจ๋ฆฌ ์„ค์ •ํ•ด์„œ OutOfMemory ๋ฌธ์ œ ํ•ด๊ฒฐ

  • Jenkins ์„œ๋ฒ„ ๋ฉ”๋ชจ๋ฆฌ 1024
  • Maven Build ๋ฉ”๋ชจ๋ฆฌ 512
  • Findbugs Plugin ๋ฉ”๋ชจ๋ฆฌ 2048

โ€ป ์ฐธ๊ณ  : ํ•ด๋‹น ์„œ๋ฒ„์˜ ์ด ๋ฉ”๋ชจ๋ฆฌ๋Š” 4G