Liberty: 시간 제한 조작 및 JDBC 호출

시간 제한 조작은 애플리케이션 서버의 JDBC 호출이 예상보다 느리거나 빨리 작동할 때 경고를 로깅합니다.

개요

사용하는 경우 시간 제한 조작 기능이 애플리케이션 서버에서 실행 중인 JDBC 조작의 기간을 추적합니다. 조작을 실행하는 데 걸린 시간이 예상보다 길거나 짧으면 시간 제한 조작 기능이 경고를 로깅합니다. 시간 제한 조작 기능은 애플리케이션 서버 로그에 주기적으로 보고서를 작성하여 실행하는 데 시간이 가장 오래 걸린 조작에 대해 자세히 설명합니다. 서버 덤프 명령을 실행하면 시간 제한된 조작 기능이 추적한 모든 조작에 대한 정보가 들어 있는 보고서를 생성합니다. 이러한 보고서에 나열된 정보를 사용하여 예상보다 느리거나 빨리 실행 중인 조작이 있는지 판별할 수 있습니다.

정기적으로, 시스템은 10개의 가장 긴 JDBC 시간 제한 조작을 포함하는 로그에 대해 보고서를 생성합니다. 이 보고서의 빈도와 사용 가능성은 1일(24 시간)당 일 회의 기본값을 사용하여 server.xml 파일에 구성 가능합니다.

시간 제한 조작을 사용 가능하게 하려면 server.xml 파일에 timedOperations-1.0 기능을 추가하십시오.

다음 예제와 같이 timedOperation 요소를 사용하여 로그에 대해 보고서를 생성할 수 없도록 설정하거나 보고서의 빈도(예: 12시간마다 한 번)를 변경할 수 있습니다.

<timedOperation enableReport="false" reportFrequency="12" />
서버는 추적된 시간 제한 조작의 수를 <maxNumberTimedOperations> 속성에 지정된 값으로 자동으로 제한합니다. 시간 제한 조작의 총 수가 지정된 최대값에 도달하면 경고가 로깅됩니다.
<timedOperation enableReport="false" reportFrequency="12" maxNumberTimedOperations="10000"/>
추적되는 시간 제한 조작의 수를 제한하기 위해 새 시간 제한 조작을 추적해야 할 때는 가장 오래 전에 사용된 시간 제한 조작 레코드가 삭제됩니다. 추적되는 시간 제한 조작의 수가 지정된 최대값에 도달하면 다음과 같이 경고가 표시됩니다.
TRAS0095I: The total number of timed operations has reached the configured maximum of 10000. As new timed operations are created the least recently used timed operations will be removed to maintain the total number of tracked timed operations at this level.

또한 server dump 명령을 사용하여 유형별로 그룹화되고 실제 지속 기간의 평균을 기준으로 각 그룹 내에서 정렬된 messages.log 파일에 있는 모든 시간 제한 조작의 전체 보고서를 가져올 수 있습니다.

다음 예제는 로깅된 메시지의 샘플을 보여줍니다.

 [3/14/13 14:01:25:960 CDT] 00000025 TimedOperatio W   TRAS0080W: Operation websphere.datasource.execute:
jdbc/exampleDS:insert into cities values ('myHomeCity', 106769, 'myHomeCountry') took 1.541 ms to complete,
 which was longer than the expected duration of 0.213 ms based on past observations.

다음 예제는 로그에서 자동으로 생성된 보고서의 샘플을 보여줍니다.

[12/13/12 7:42:29:509 CST] 0000001d com.ibm.wsspi.timedoperations.TimedOperationService I TRAS0092I: 
The following operations took the longest time to run since the last report has been generated:
Operation websphere.datasource.execute:jdbc/exampleDS:insert into cities values ('myHomeCity', 
106769, 'myHomeCounty') took 194ms to complete
Operation websphere.datasource.execute:jdbc/exampleDS:select county from cities where name=
'myHomeCity' took 187ms to complete
Operation websphere.datasource.execute:jdbc/exampleDS:drop table cities took 182ms to 
complete\Operation websphere.datasource.execute:jdbc/exampleDS:insert into cities values 
('myHomeCity', 106769, 'myHomeCounty') took 151ms to complete

전체 시간 제한 조작 구성 참조에 대해서는 시간 제한 조작을 참조하십시오.


주제의 유형을 표시하는 아이콘 개념 주제

파일 이름: cwlp_timeop.html