Programming/xml2019. 7. 9. 10:41

xpath 등으로 특정 노드를 조회하고, 그 원본 데이터를 받을때 사용하는 듯?

 

[링크 : http://xmlsoft.org/html/libxml-tree.html#xmlNodeDump]

[링크 : https://stackoverflow.com/questions/8232094/libxml-xmlnodeptr-to-raw-xml-string]

'Programming > xml' 카테고리의 다른 글

xpath..  (0) 2019.08.01
xmllint string()  (0) 2019.07.25
libxml2  (0) 2019.07.04
xmlstarlet  (0) 2016.05.26
DOM vs SAX  (0) 2014.11.21
Posted by 구차니
Programming/Java(Spring)2019. 7. 6. 19:59

128GB 서버에서 돌리니 최대 힙 사이즈가 32기가가 잡히는것 같고

16GB 서버에서 확인해보니 InitialHeapSize 와 MaxHeapSize가 모두 1/4 크기이다.

# java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize'
     intx CompilerThreadStackSize                   = 0                                   {pd product}
    uintx ErgoHeapSizeLimit                         = 0                                   {product}
    uintx HeapSizePerGCThread                       = 87241520                            {product}
    uintx InitialHeapSize                          := 2109734912                          {product}
    uintx LargePageHeapSizeThreshold                = 134217728                           {product}
    uintx MaxHeapSize                              := 32210157568                         {product}
     intx ThreadStackSize                           = 1024                                {pd product}
     intx VMThreadStackSize                         = 1024                                {pd product}
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

[링크 : https://www.mkyong.com/java/find-out-your-java-heap-memory-size/]

 

spring boot로 실행하니(java -jar을 통해서 war 실행)

-Xms2971M -Xmx3971M -Xmn400M 으로 뜨는데 순서대로 (실수.. 카산드라 메모리였음.. -_ㅠ)

InitialHeapSize / MaxHeapSize / 마지막은 모르겠네?

아무튼.. 저 값이 기본인지 부터 확인해야 할 듯

1. -X Option (모든 VM에서 동작하지 않을 수 있는 비표준 option이며, 버젼별로 언급없이 변경되어질 수 있음)
-Xms : 초기 Heap size 설정
-Xmx : 최대 Heap size 설정
-Xss : 각 Thread에 할당되는 Stack size 설정
-Xmn : New 영역을 위한 Heap size 설정

2. -XX Option (올바른 동작을 위해 특정한 시스템 요구사항들이 있으며, 시스템 설정 파라미터에 대한 접근 권한이 요구됨)
-XX:PermSize : 초기 Permanent size 설정
-XX:MaxPermSize : 최대 Permanent size 설정

[링크 : https://webprogrammer.tistory.com/1430]

[링크 : https://spring.io/blog/2015/12/10/spring-boot-memory-performance]

 

+

일단은 -Xmx로 설정해주는게 영향을 주긴 한 듯..

Posted by 구차니
Programming/Java(Spring)2019. 7. 6. 19:50

이거 먼가.. 심각하게 심각해 보이는데..

아무튼 heap 메모리를 좀 넉넉하게 잡아주면 될거 같으면서도 애매하네?

 

java -Xmx1024m com.yourcompany.YourClass

[링크 : https://helloino.tistory.com/97]

[링크 : https://www.baeldung.com/java-gc-overhead-limit-exceeded]

 

If starting the app with the spring-boot plugin:

mvn spring-boot:run -Drun.jvmArguments="-Xmx512m" -Drun.profiles=dev
Otherwise if running java -jar:

java -Xmx512m -Dspring.profiles.active=dev -jar app.jar

[링크 : https://stackoverflow.com/questions/23072187]

'Programming > Java(Spring)' 카테고리의 다른 글

jsoup html body 사이즈 제한  (0) 2019.09.26
java 메모리 관련...2?  (0) 2019.07.06
mvn -P profile  (0) 2019.06.08
tomcat9 on ubuntu18.04  (0) 2019.06.07
tomcat 자동 war 배포 막기  (0) 2019.06.07
Posted by 구차니
Programming/xml2019. 7. 4. 17:45

<element attribute="property"> 였나 기억이 가물가물하네

 

[링크 : https://gist.github.com/khajavi/5690057]

'Programming > xml' 카테고리의 다른 글

xmllint string()  (0) 2019.07.25
libxml2 - xmlNodeDump()  (0) 2019.07.09
xmlstarlet  (0) 2016.05.26
DOM vs SAX  (0) 2014.11.21
xml parser 선택 / 종류  (0) 2014.11.21
Posted by 구차니
Programming/node.js2019. 6. 28. 15:55

'Programming > node.js' 카테고리의 다른 글

node.js xpath select() select1()  (0) 2019.07.25
node.js xpath apidoc  (0) 2019.07.25
node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js xml2js  (0) 2019.06.19
Posted by 구차니
Programming/Java2019. 6. 25. 17:31

간단하게 java에서 XML 을 쓰기 위한 프레임워크, 혹은 라이브러리라고 보면 되려나?

[링크 : https://ko.wikipedia.org/wiki/JAXB]

 

[링크 : https://ukzzang.tistory.com/12]

[링크 : https://coding-start.tistory.com/36]

[링크 : https://howtodoinjava.com/jaxb/read-xml-to-java-object/]

[링크 : http://www.javawebtutor.com/articles/jaxb/jaxb_java_class_from_xsd.php]

'Programming > Java' 카테고리의 다른 글

java oop 개념  (0) 2020.01.15
java cipher  (0) 2019.11.25
jar 실행하기  (0) 2019.01.15
Object.clone()  (2) 2019.01.09
javax print  (0) 2019.01.03
Posted by 구차니

python의 expat을 써보려는데 원하는대로 안되서 멘붕 중

 

xmlparser.ParseFile(file)
Parse XML data reading from the object file. file only needs to provide the read(nbytes) method, returning the empty string when there’s no more data.

[링크 : https://docs.python.org/3.1/library/pyexpat.html]

 

>>> r = open('18549666.xml')
>>> p.ParseFile(r)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: read() did not return a bytes object (type=str)

 

rb(read binary)가 중요한거였냐..

>>> r = open('18549666.xml','rb')

[링크 : https://stackoverflow.com/questions/1179305/expat-parsing-in-python-3]

Posted by 구차니

 

$ sudo apt install postgresql-server-dev-all

$ pip3 install psycopg2

$ python3

import psycopg2 as pg2 
conn=pg2.connect(database="postgres",user="postgres",password="1234",host="localhost",port="5432") 
cur = conn.cursor() 
cur.execute("select * from table_name") 
cur.fetchall()

[링크 : https://freeprog.tistory.com/100]

'Programming > python(파이썬)' 카테고리의 다른 글

python pip 특정 버전설치 / 목록에서 설치  (0) 2019.09.09
python expat parseFile()  (0) 2019.06.24
python pip 특정 버전 설치하기  (0) 2019.06.18
python pdb를 이용한 디버깅  (0) 2019.05.15
anaconda(python)  (0) 2019.05.15
Posted by 구차니
Programming/android2019. 6. 21. 18:23

헐.. api 발급 안 받아서 지도가 안뜬걸 메모리 부족해서 그런걸로 나 착각한겨?

(내 2만원.. ㅠㅠ)

 

[링크 : https://blog.cosmosfarm.com/archives/389/구글-지도-api-키-발급-받는-방법-maps-javascript-api/]

Posted by 구차니
Programming/node.js2019. 6. 21. 18:06

효과가 있는진 확인 못함..

(그 메모리 용량 가기 전에 느려지는 것으로 보여 xml-stream 모듈에 문제가 있는 걸로 보임)

 

[링크 : https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory]

'Programming > node.js' 카테고리의 다른 글

node.js xpath apidoc  (0) 2019.07.25
node.js readline()  (0) 2019.06.28
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js xml2js  (0) 2019.06.19
node.js Javascript heap out of memory  (0) 2019.06.19
Posted by 구차니