버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
Sv translation
languageko_KR

MagicINFO Server 서비스를 등록/변경/삭제하는 방법을 가이드합니다. 

서비스 등록/삭제


MagicINFO Server 서비스 실행시 기본적으로 적용하게 될 옵션을 추가로 지정하거나 변경할 수 있고, 윈도우 서비스에 삭제, 등록하여 적용시킬 수 있습니다. 

예를 들어 jvm의 memory가 부족할 경우 heap memory나 perm memory 사이즈를 변경할 수 있습니다. 

설정 변경 방법


  1. 아래 경로로 이동하여 "service.bat" 파일을 찾습니다. 

파일 경로 : 매직인포설치경로\tomcat\bin\service.bat


2. 해당 파일을 Text Editor로 연 후 하단으로 이동하여 :installed 아래의 명령을 확인합니다. 서비스가 등록되어 실행될때 수행될 옵션을 지정할 수 있습니다. 

정보

관련 옵션은 데몬 실행 설정을 참고하세요.

옵션 리스트 : https://commons.apache.org/proper/commons-daemon/procrun.html



3. 데몬 설정과 관련된 옵션을 추가/수정/삭제 한 후 등록된 서비스를 중지 후 삭제, 재시작한다재시작합니다.

서비스 중지 - 서비스 삭제 - 서비스 설치 - 서비스 재시작 순서로 실행한다실행합니다

구분명령어
서비스 삭제service uninstall 
서비스 설치service install



Tomcat server.xml 설정


Tomcat이 구동될때 웹서비스가 실행되면서 필요한 각종 설정을 수정 할 수 있습니다. 

해당 파일을 텍스트 에디터로 연 후 수정이 필요한 값을 수정하여 저장하고, MagicInfoPremium 서비스를 재시작하면 적용되어 실행됩니다. 

파일 경로 : 매직인포설치경로\tomcat\conf\server.xml


기존 옵션 설명

옵션설명
port

해당 connector가 동작하는 port number를 지정합니다.

해당 port가 이미 사용중인 경우 port number를 변경하여 다른 port로 사용할 수 있습니다.

maxHttpHeaderSize HTTP Header 에 정보가 많이 실릴 경우 기본 값이 4KB 이기 때문에 서비스 특성에 맞게 조정이 필요합니다.
maxThreads

가장 중요한 옵션입니다. Tomcat 내의 Thread수를 결정 하는 옵션입니다. Thread수는 실제 Active User 수를 뜻합니다. 즉 순간 처리 가능한 Transaction 수를 의미합니다.

일반적으로 100 내외가 가장 적절하고, 트렌젝션의 무게에 따라 50~500 개 정도로 설정하는 게 일반적입니다. 이 값은 성능 테스트를 통해서 튜닝을 하면서 조정해 나가는 것이 좋습니다.

acceptCount

이 옵션은 request Queue의 길이를 정의합니다. HTTP request가 들어왔을때 idle thread가 없으면 queue에서 idle thread가 생길때 까지 요청을 대기하는 queue의 길이입니다. 보통 queue에 메세지가 쌓였다는 것은 해당 톰캣 인스턴스에 처리할 수 있는 쓰레드가 없다는 이야기이고, 모든 쓰레드를 사용해도 요청을 처리를 못한다는 것은 이미 장애 상태일 가능성이 높습니다.

그래서 큐의 길이를 길게 주는 것 보다는, 짧게 줘서, 요청을 처리할 수 없는 상황이면 빨리 에러 코드를 클라이언트에게 보내서 에러처리를 하도록 하는 것이 좋습니다. Queue의 길이가 길면, 대기 하는 시간이 길어지기 때문에 장애 상황에서도 계속 응답을 대기를 하다가 다른 장애로 전파 되는 경우가 있습니다.

maxPostSize 

Tomcat을 사용시 post 로 너무 많은 데이터를 전송하게 되면 request 데이터가 초기화(null) 되는 현상이 발생합니다. 
post 방식으로 form 데이터를 전송할 시 form 데이터의 크기가 default 값인 2M를 초과할 시에는 별도로 설정을 해주어야 합니다.

secure

SSLEnabled

sslProtocol

sslEnabledProtocols

SSL 설정 관련 옵션입니다.

자세한 사항은 SSL 설명을 참고하세요. ▶SSL/TLS 설정 가이드


더 다양한 옵션을 확인하고 싶으면 Tomcat 공식 사이트에서 참고할 수 있습니다.

정보

사이트 주소 : https://tomcat.apache.org/tomcat-8.0-doc/config/http.html

경고

설치된 tomcat version에 맞게 설정함을 주의하세요. 


Tomcat Cache 삭제


Tomcat에 의해 웹어플리케이션이 배포되면 기본적으로 cache가 남게 되는데 웹어플리케이션 파일(매직인포설치경로\server)에 변경 사항이 생겼을경우 제대로 구동에 반영되지 않을 수 있습니다. 

이때는 cache가 저장되는 폴더들의 하위 폴더와 파일들을 삭제하고 MagicInfo MagicINFO Server 서비스를 재시작하면 됩니다.

경고

cache를 삭제했을때 tomcat이 제대로 구동이 안될수 있으니 삭제 전 반드시 해당 폴더들을 백업 후 삭제해야 합니다.


폴더 경로 : tomcat\temp, tomcat\webapps, tomcat\work

Tomcat log 확인 방법


Tomcat 구동에 관련한 로그를 확인하려면 tomcat\logs 폴더 내 파일을 참고하면 됩니다. log 내용을 바탕으로 Tomcat 구동시의 문제를 파악하고 튜닝을 할 수 있습니다.


로그 파일 종류

파일명설명
catalina.YYYY-MM-DD.log서버의기동,정지, 서비스의개시, 정지정보(tomcat 자체에관한)
host-manager.logTomcat Host Manager Web app 로그 (가상호스트매니저)
manager.logTomcat Manager Web App 로그 (웹콘솔)
localhost.loghost( VirtualHost 같은) 한정한 로그
commons-daemon.log데몬 (백그라운드 서비스) 실행에 대한 로그
magicinfo*.logmagicinfo 내 각 제품별 로그


Tomcat 모니터링 및 튜닝


 MagicINFO server의 동작이 느려지는 문제 등을 겪을 땐 Tomcat이 사용하고 있는 thread 등의 실행 상황을 파악하고, 서버 실행 상황에 맞게 튜닝할 수 있습니다.

    1. 톰캣 관리자를 이용한 모니터링

      b. 튜닝



Sv translation
languageen

Read the following to registThis document describes how to register, edit or delete the MagicINFO Server service.

Regist

Register / Delete the service


You can specify options additionally or change options that will be applied by default add new or edit default options when running the service of MagicINFO Server.And it can be applied by deleting from and registering

to For applying, you need to delete and register the related Windows service.

For example, in case jvm case the JVM is out of memory, you can change the size of heap memory or perm memory.

How to change the options


First, go to the path mentioned below path and find "service.bat" file.

File path : {The path installed the MagicINFO Server}\tomcat\bin\service.bat


After opening the file with a text editor, move the page down and check the command under :installed. (Refer the below image)

You can specify or change the options that will be executed when the service is registed and started.

For the related options, refer the configuration of daemon execution.

The list of options : https://commons.apache.org/proper/commons-daemon/procrun.html

After modifying(adding/editing/deleting) the options related to daemon configuraionconfiguration, stop, delete and restart the registed registered service.

Execute in order : Stop the service → Delete the service → Install the service → Restart the service


TypeCommand
Delete serviceservice uninstall 
Install serviceservice install




Tomcat Configurations (modify server.xml)


You can modify the required settings that required for executing the web service when running tomcatTomcat.

After opening below file with a text editor, modify the options that you need and save, and restart MagicInfoPremium service to take effect.

File path : {The path installed the MagicINFO Server}\tomcat\conf\server.xml

Image RemovedImage Added


The descriptions of existing options

optiondescription
port

Specify a port number that the connector operates on. If the port is already in use, then you can change the port number to use.

maxHttpHeaderSize

If there is a lot of information in the HTTP Header, it needs to be modified according to the characteristics of the service. (The default value is 4KB)

maxThreads

It is a very important option. This option determines the number of threads in tomcatTomcat. The number of threads means the number of active users. In other words, it means the number of transactions that can be processed instantlyat the same time.

Generally, around 100 is the most appropriate value is around 100, and it is common to set around 50 to 500 depending on the weight of the transaction. It is better to adjust this value while tuning through a performance test.

acceptCount

This option defines the length of the request queue. When an HTTP request comes in, if there is no idle thread, this is the length of the queue waiting for the request until an idle thread is created in the queue. Normally, messages that piled up in the queue means that there is no thread available to process the request through the Tomcat instance, and it is likely that it is already in a disability disabled state and that requests cannot be processed even if all threads are used.

So, it is better to make short the length of queue short rather than make long. Because if requests cannot be processed any more, it's better to send an error code to clients as soon as possible to handle the error.

 If the length of the queue is long, the waiting time becomes longer. Then, there can be a case that the response is continuously waiting even in a failure situation and then propagated to another failure.

maxPostSize 

When using tomcatTomcat, if too much data is sent in the post method, request data can be initailizedinitialized(be null). So, when transmitting form data in the post method, if the size of form data exceeds 2M(default value), it must be set separately.

secure

SSLEnabled

sslProtocol

sslEnabledProtocols

The option is regard of regarding SSL settings.

For more information, refer to the link below link.

1.7 SSL/TLS 설정 가이드

정보

For more information, refer to the official Tomcat site of Tomcat.

Official site : https://tomcat.apache.org/tomcat-8.0-doc/config/http.html


Delete Tomcat cache


Basically, when a web-application is deployed by tomcatTomcat, the cache is left.

Because of cache, when changes are made to the web-application file ({The path installed the MagicINFO Server}\server), it may not be applied properly.

In this case, delete all folders and files under the folders that cache is stored and restart the MagicINFO Server service.

경고

When you delete the cache, tomcat may Tomcat may not run properly, so you must back up the folders before deleting just in case.


Folder path : tomcat\temp, tomcat\webapps, tomcat\work

Image RemovedImage Added

Image RemovedImage Added


How to check

tomcat

Tomcat log


To check the log about tomcat Tomcat operation, refer to the files under the folder "tomcat\logs".

You can figure out the problem of tomcat Tomcat operation and tune the settings based on the logs.

Image RemovedImage Added


The Types types of log files

File nameDescription
catalina.YYYY-MM-DD.log

Server start, stop, service start, stop information (for tomcatTomcat)

host-manager.logTomcat Host Manager Web app log (virtual host manager)
manager.logTomcat Manager Web App log (web console)
localhost.logHost (same to VirtualHost) limited log
commons-daemon.log

Daemon(background service) execution log

magicinfo*.log

Log for each products in MagicINFO


Tomcat Monitoring and how to tune


When you encounter problems such as slow operation of Magicinfo server, you can grasp the execution status of threads used by Tomcat and tune it according to the server execution status.


  1. Monitoring using Tomcat manager

      2. Tuning