라벨이 tomcat인 게시물 표시

resize tomcat heap

#before heap size [root@localhost min]# jmap -heap 109487 Attaching to process ID 109487, please wait... Debugger attached successfully. Server compiler detected. JVM version is 25.252-b09 using thread-local object allocation. Parallel GC with 2 thread(s) Heap Configuration: MinHeapFreeRatio = 0 MaxHeapFreeRatio = 100 MaxHeapSize = 987758592 (942.0MB) NewSize = 20971520 (20.0MB) MaxNewSize = 329252864 (314.0MB) OldSize = 41943040 (40.0MB) NewRatio = 2 SurvivorRatio = 8 MetaspaceSize = 21807104 (20.796875MB) CompressedClassSpaceSize = 1073741824 (1024.0MB) MaxMetaspaceSize = 17592186044415 MB G1HeapRegionSize = 0 (0.0MB) Heap Usage: PS Young Generation Eden Space: capacity = 278921216 (266.0MB) used = 22089864 (21.06653594970703MB) free = 256831352 (244.93346405029297MB) 7.919750357032719% used

build docker image

#make dockerfile [root@k8s-master docker-tomcat-war]# ll 합계 20 -rw-r--r--. 1 root root 110 4월 7 08:46 Dockerfile -rw-r--r--. 1 root root 681 4월 7 08:39 README.md -rw-r--r--. 1 root root 96 4월 7 08:39 docker-compose.yml -rw-r--r--. 1 root root 4606 4월 7 08:39 sample.war [root@k8s-master docker-tomcat-war]# vi Dockerfile FROM tomcat MAINTAINER gnoti@gmail.com ADD sample.war /usr/local/tomcat/webapps/ CMD ["catalina.sh", "run"] #build dockerfile [root@k8s-master docker-tomcat-war]# docker build -t gnoti_tomcat . Sending build context to Docker daemon 64kB Step 1/4 : FROM tomcat latest: Pulling from library/tomcat f15005b0235f: Pull complete 41ebfd3d2fd0: Pull complete b998346ba308: Pull complete f01ec562c947: Pull complete 74c11ae3efe8: Pull complete 3a7e595a3ef5: Pull complete 208407758d73: Pull complete b5238120a381: Pull complete 1716556aae46: Pull complete 1336a11b2bd2: Pull complete Digest: sha256:c0ba286d9903006423ff4e2818845f1cc

ELK설치 5편 (Application Performance Monitoring)

이미지
안정적인 서비스 운영을 위해 꼭 필요한 APM(Application Performance Management)을 구성하여 현재 시스템의 어느 곳이 성능 병목 구간인지, 어떤 에러가 발생하는지 추적해보겠습니다. APM 설치 APM서버 다운로드 및 설치 환경설정 vi /etc/apm-server/apm-server.yml APM서버 실행 /usr/share/apm-server/bin/apm-server -c /etc/apm-server/apm-server.yml APM Agent 다운로드 https://search.maven.org/search?q=a:elastic-apm-agent https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/0.7.0/elastic-apm-agent-0.7.0.jar APM Agent 실행 java -javaagent:/home/min/elastic-apm-agent-0.7.0.jar -Delastic.apm.service_name=my-application -Delastic.apm.server_url=http://localhost:8200 -Delastic.apm.application_packages=org.example -jar my-application.jar 또는  # vi /home/min/apache-tomcat-7.0.91/bin/catalina.sh 에 이하 내용 추가 APM Agent 서비스 실행 실패의 경우 서비스 기동후, Tomcat서버에서 ELK서버로의 connect 실패의 경우 ELK서버에서 # vi /etc/elasti