메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


Kafka로부터 메세지를 받는 spark기반 client프로그램을 구동시 처리할 메세지가 갑자기 증가하게 되면 OutOfMemoryError가 발생하면서 많은 수의 hs_err_pid???.log파일이 생성되며 JVM관련 명령어(예, jps)를 실행하면 "java.lang.OutOfMemoryError: unable to create new native thread"의 오류가 발생할 수 있는데 이것은 NIO관련 라이브러리가 디폴트로 0(무제한)의 DirectMemoryBuffer를 제공함으로서 모든 메모리를 소진하기 때문이다. 이럴때는 파일엑세스처리가 많이 일어나는 JVM을(예, tomcat)기동시 -XX:MaxDirectMemorySize(예, 2G(2147483648), 2*1024*1024*1024)등을 지정하여 무제한으로 사용되지 않도록 설정하고 재기동해준다.


*참고(Tomcat 메모리 CATALINA_OPTS 설정) : http://starplaying.tistory.com/446


-------------------오류내용--------------------

-bash-4.1$ jps

Error occurred during initialization of VM

java.lang.OutOfMemoryError: unable to create new native thread


------------------폴더에 오류로그 파일들도 다수 생성된다. ----------

hs_err_pid11579.log  hs_err_pid14873.log  hs_err_pid3724.log  hs_err_pid5596.log  hs_err_pid69979.log  hs_err_pid8240.log   hs_err_pid8859.log  hs_err_pid9857.log

번호 제목 날짜 조회 수
221 kudu table와 impala(hive) table정보가 틀어져서 테이블을 읽지 못하는 경우(Error Loading Metadata) 조치방법 2023.11.10 723
220 Flume을 이용한 데이타 수집시 HBase write 성능 튜닝 file 2016.10.31 724
219 solr에서 한글사용시 주의점 2014.09.26 731
218 springframework를 이용한 war를 생성하는 build.gradle파일(참고용) 2016.08.19 732
217 Spark 1.6.1 설치후 HA구성 2016.05.24 734
216 Halyard - RDF4J와 Apache HBase를 이용하여 구현된 TripleStore이며 SPARQL 1.1쿼리를 지원한다. 2016.12.29 734
215 [SBT] assembly시 "[error] deduplicate: different file contents found in the following:"오류 발생시 조치사항 2016.08.04 737
214 Failed to write to server: (no server available): 2022.01.17 737
213 znode /hbase recursive하게 지우기 2015.05.06 739
212 fuseki용 config-examples.ttl 예시 내용 2017.05.17 746
211 서버 5대에 solr 5.5.0 설치하고 index data를 HDFS에 저장/search하도록 설치/설정하는 방법(SolrCloud) 2016.04.08 749
210 CentOS 7.x에 Jupyter설치 2018.04.18 754
209 sendmail전송시 421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory 발생시 조치사항 2017.06.11 756
» java.lang.OutOfMemoryError: unable to create new native thread오류 발생지 조치사항 2016.10.17 757
207 solr 인스턴스 기동후 shard에 서버가 정상적으로 할당되지 않는 경우 해결책 2016.04.29 770
206 lateral view 예제 2014.09.18 775
205 [Sentry]HDFS의 ACL을 Sentry와 연동후 테스트 2020.06.02 777
204 hue.desktop_document2의 type의 종류 2020.02.10 779
203 hortonworks에서 제공하는 메모리 설정값 계산기 사용법 file 2015.06.14 792
202 SASL configuration failed: javax.security.auth.login.LoginException: java.lang.NullPointerException 오류 해결방법 2015.04.02 803
위로