JP2011054114A - Method, device, and program for handling memory leak - Google Patents

Method, device, and program for handling memory leak Download PDF

Info

Publication number
JP2011054114A
JP2011054114A JP2009204921A JP2009204921A JP2011054114A JP 2011054114 A JP2011054114 A JP 2011054114A JP 2009204921 A JP2009204921 A JP 2009204921A JP 2009204921 A JP2009204921 A JP 2009204921A JP 2011054114 A JP2011054114 A JP 2011054114A
Authority
JP
Japan
Prior art keywords
processing
data
processing means
queue
restart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009204921A
Other languages
Japanese (ja)
Other versions
JP5203321B2 (en
Inventor
Hiroki Akama
浩樹 赤間
Ichibe Naito
一兵衛 内藤
Tomohiro Hasegawa
知洋 長谷川
Takashi Keuke
崇 毛受
Masashi Yamamuro
雅司 山室
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2009204921A priority Critical patent/JP5203321B2/en
Publication of JP2011054114A publication Critical patent/JP2011054114A/en
Application granted granted Critical
Publication of JP5203321B2 publication Critical patent/JP5203321B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To release a memory even when there is a difference in degree or frequency of memory leak of processing, by using software having a memory leak to continue a service and handling the memory leak at intervals regardless of the number of machines. <P>SOLUTION: A process managing means has a means which selects a corresponding number of processing means in accordance with the number of processing means to be simultaneously restarted, issues a stop instruction to the processing means, and repeats processing that receives a restart completion notification from the stopped processing means, for all the processing means. The processing means has a stop control means which selects one queue managing means by an arbitrary algorithm, acquires data from the queue managing means, increases a value of a restart counter in accordance with the risk of a resource leak in accordance with processing or the data while executing the processing corresponding to the acquired data, and stops the process when the counter value exceeds a reference value set beforehand. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、メモリリーク対応処理方法及び装置及びプログラムに係り、特に、ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するためのメモリリーク対応処理方法及び装置及びプログラムに関する。   The present invention relates to a memory leak handling processing method, apparatus, and program, and more particularly, to a memory leak handling processing method and apparatus for providing a service while dealing with a memory release leak (hereinafter referred to as a memory leak) due to software quality. Regarding the program.

従来、メモリリークの発生を前提とした技術として以下のようなものがあった。   Conventionally, there have been the following technologies premised on the occurrence of memory leaks.

第1の方法は、Act-Stby型の高可用クラスタ構成を活用する方法である。サービス用のアプリケーションサーバを上記クラスタ構成とし、所定時間毎にフェールオーバ(現用サーバから待機サーバへの切り替え)を実行し、旧現用系のOSやサービス用のアプリケーション・プログラムをリセット(再起動)することで、サービスの停止を未然に防ぐものである(例えば、特許文献1参照)。   The first method utilizes an Act-Stby type highly available cluster configuration. The service application server has the above-mentioned cluster configuration, and failover (switch from the active server to the standby server) is executed at predetermined time intervals to reset (restart) the old active OS and service application programs. Thus, the service is prevented from being stopped (for example, see Patent Document 1).

また、第2の方法は、サービス中断を最小化する方法である。Webサービスや映像ストリーミングサービスなどの参照系サービスで主に用いられる方法である。   The second method is a method for minimizing service interruption. This method is mainly used in reference services such as Web services and video streaming services.

典型的な構成を図10に示す。   A typical configuration is shown in FIG.

これは、この同一コンテンツを持つActサーバ群(図10のマシン2〜マシン2)を並べ、そのフロントに処理の振り分けを行うロードバランサ(LB)1を置いたクラスタ構成として外側の追記クライアント10〜10の処理リクエストに対して、LB1が処理をマシン2〜マシン2に振り分けて対応する。このとき各マシンの処理にメモリリークの発生の可能性がある場合、例えば、マシン2で考えると、
(1)まず、各追記クライアント10からの新たなコネクションやリクエストがマシン2に行かないようにLB1を設定変更し、マシン2上で残るサービスが全て終了した段階で、マシン2を停止し、リソースを開放し、再起動を行う。
This is a cluster configuration in which an Act server group (machine 2 1 to machine 2 m in FIG. 10) having the same content is arranged, and a load balancer (LB) 1 that distributes processing is placed on the front thereof. For the processing requests of 10 1 to 10 x , the LB 1 distributes the processing to the machines 2 1 to 2 m and responds. If this time there is a possibility of the occurrence of a memory leak in the processing of each machine, for example, considering the machine 2 1,
(1) First, at the stage where new connections and requests to change set the LB1 so as not to go to the machine 2 1, it has ended all services that remain on the machine 2 1 from each of the additional recording client 10, stop the machine 2 1 Release resources and restart.

(2)マシン2の再起動が完了し、アプリケーション・プログラムの起動も整った段階で、LB1に対し、マシン2への新たなコネクションやリクエストを許可するように設定変更する。 (2) to re-start the machine 2 1 has been completed, with even well-equipped stage start-up of the application program, for LB1, changes the setting to allow a new connection and requests to the machine 2 1.

上記の作業を残りのマシン2〜マシン2についても順に実施する。 The above operation is performed in order for the remaining machines 2 2 to 2 m .

これらの一連の作業を定期的に行うことで、サービスを停止することなく各マシンのメモリリークを解放することが可能になる。   By periodically performing a series of these operations, it becomes possible to release the memory leak of each machine without stopping the service.

第3の方法として、先の例でLB(ロードバランサ)という部分の代わりに、管理サーバを設け、評価式に基づいて複数の処理装置のうち再起動を行う装置を選択するようにすることで、再起動の影響をできるだけ受けないようにする再起動サーバを選択するようにする方法がある(例えば、特許文献2参照)。   As a third method, a management server is provided instead of the part called LB (load balancer) in the previous example, and a device to be restarted is selected from a plurality of processing devices based on the evaluation formula. There is a method of selecting a restart server that minimizes the influence of restart (for example, see Patent Document 2).

特開2001−188684号公報JP 2001-188684 A 特開2006−31096号公報JP 2006-31096 A

しかしながら、上記従来の第1の方法は、フェールオーバの間に、アプリケーション・プログラム、つまりサービスが中断するという問題があり、無停止が求められるサービスに向かない。   However, the first conventional method has a problem that the application program, that is, the service is interrupted during the failover, and is not suitable for a service that requires non-stop.

また、第2の方法は、以下のような問題がある。   Further, the second method has the following problems.

・サービスの停止もしくはアプリケーション・プログラムの停止を確認するための手段の汎用化がなく、自動化ができていない点;
・全体の再起動までにマシンの台数に応じた時間がかかる点;
・マシン単位での再起動となるため、全体に復帰までの時間がかかる点;
これらの問題から、高い頻度のメモリリークへの対応には向かないことも問題であった。
-There is no generalization of the means for confirming service stoppage or application program stoppage, and automation is not possible;
・ It takes time depending on the number of machines before the entire restart;
-Since it will be restarted in units of machines, it takes time to return to the whole;
Because of these problems, it is also a problem that it is not suitable for dealing with high frequency memory leaks.

また、第3の方法は、一般にLBに相当する集中サーバ部分がシステム全体のボトルネックとなるケースがあり、その部分で評価を行うことは、性能面で良い方式とはいえないという問題があった。   In the third method, there is a case where the centralized server portion corresponding to LB generally becomes a bottleneck of the entire system, and it is not a good method in terms of performance to perform evaluation in that portion. It was.

同様に、LBで各マシンの状態を把握する方法もシングルポイントであるLBの負荷を高くするため、性能面でよい方式とはいえない。   Similarly, the method of grasping the state of each machine by the LB is not a good method in terms of performance because it increases the load of the single point LB.

本発明は、上記の点に鑑みなされたもので、
・メモリリークのあるソフトウェアを使って、継続的なサービスを実現すること;
・その際、シングルポイントなるボトルネック部分を設けないこと;
・メモリリークの頻度の高い場合にも対応できること;
が可能なメモリリーク対応処理方法及び装置及びプログラムを提供することを目的とする。
The present invention has been made in view of the above points.
-Realize continuous service using software with memory leaks;
・ Do not provide a single point bottleneck at that time;
-Capable of dealing with frequent memory leaks;
An object of the present invention is to provide a memory leak handling method, apparatus, and program capable of performing the above.

図1は、本発明の原理構成図である。   FIG. 1 is a principle configuration diagram of the present invention.

本発明(請求項1)は、ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理装置であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段20のキュー21からデータを取得して処理を行う少なくとも2つ以上の処理手段32と、
処理手段32群を管理するプロセス管理手段31と、を有し、
プロセス管理手段31は、
運用者からの再起動通知に応じて、または、定期的に、同時再起動数に応じて、同時再起動数分の処理手段を選択して、各処理手段に停止を指示し、そして、停止分の処理手段32を再起動させ、該停止分の処理手段からの再起動完了通知を受信する処理を全ての処理手段に対して繰り返す再起動制御手段311を有し、
処理手段32は、
任意のアルゴリズムによって1つのキュー管理手段20を選択し、該キュー管理手段20からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ、再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合、及び、プロセス管理手段31から停止を指示された場合に、当該プロセスを停止する停止制御手段321と、
プロセス管理手段31から再起動が指示された場合に再起動を行い、再起動完了通知を該プロセス管理手段31に送信する手段と、を有する。
The present invention (Claim 1) is a memory leak handling processing apparatus that provides a service while dealing with a memory release leak (hereinafter referred to as a memory leak) due to software quality,
At least two or more processing means 32 for acquiring and processing data from the queue 21 of the queue management means 20 for queuing and managing data received from outside;
Process management means 31 for managing the processing means 32 group,
The process management means 31
Depending on the restart notification from the operator or periodically, according to the number of simultaneous restarts, select the processing means for the number of simultaneous restarts, instruct each processing means to stop, and stop A restart control means 311 that restarts the processing means 32 for the remaining minutes and repeats the processing for receiving the restart completion notification from the processing means for the stop for all the processing means,
The processing means 32
When one queue management unit 20 is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit 20, and a process corresponding to the data is executed, a resource leak occurs depending on the process or the data. Increase (or decrease) the value of the restart counter according to the risk that occurs, stop when the value of the restart counter exceeds (or falls below) a preset reference value, and stop from the process management means 31 Stop control means 321 for stopping the process when instructed
And a means for performing a restart when a restart is instructed from the process management means 31 and transmitting a restart completion notification to the process management means 31.

本発明(請求項2)は、ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理装置であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
処理手段群を管理するプロセス管理手段と、を有し、
プロセス管理手段は、
実行中の処理手段の数をカウントし、予め設定された管理対象処理手段の数に満たなければ不足分の処理手段を起動させる処理を、該処理手段からの停止通知を受信するまで、または、定期的に繰り返す起動制御手段を有し、
処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じたカウンタの値を増加(もしくは減少)させ、再起動カウンタが事前に設定された基準値を超えた(もしくは下回った)場合に、当該プロセスを停止させ、停止通知を前記プロセス管理手段に送信する停止制御手段と、
プロセス管理手段から起動が指示されると、プロセスを起動させる手段と、を有する。
The present invention (Claim 2) is a memory leak handling processing apparatus that provides a service while dealing with a memory release leak (hereinafter referred to as a memory leak) due to software quality,
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
Process management means for managing the processing means group,
Process management means
Counting the number of processing means being executed and starting the insufficient processing means if the number does not satisfy the preset number of management target processing means until a stop notification is received from the processing means, or It has a startup control means that repeats regularly,
The processing means is
When one queue management unit is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit, and a process corresponding to the data is executed, a resource leak occurs depending on the process or data. The value of the counter corresponding to the risk is increased (or decreased), and when the restart counter exceeds (or falls below) a preset reference value, the process is stopped and a stop notification is sent to the process management unit. Stop control means to transmit to,
And a means for starting a process when the process management means gives an instruction to start.

また、本発明(請求項3)は、請求項1または2の処理手段において、
複数のサービス用の処理モジュールと、
各サービス用モジュールを組み合わせて実行するためのスクリプトの制御手段と、
外部から入力された少なくとも1つ以上のサービスを実現するスクリプトを処理IDと対応させて記憶手段に格納するスクリプト格納手段と、
キュー管理手段から取得したデータもしくはデータを取得したキュー管理手段に直接的または間接的に付随する処理IDに基づいて記憶手段からスクリプトを取得して実行するスクリプト実行手段と、を更に有する。
Further, the present invention (Claim 3) is the processing means of Claim 1 or 2,
Processing modules for multiple services;
Script control means for combining and executing each service module;
Script storage means for storing a script for realizing at least one service input from the outside in a storage means in association with a process ID;
Script execution means for acquiring and executing a script from the storage means based on data acquired from the queue management means or a processing ID directly or indirectly associated with the queue management means that acquired the data.

図2は、本発明の原理を説明するための図である。   FIG. 2 is a diagram for explaining the principle of the present invention.

本発明(請求項4)は、ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理方法であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
処理手段群を管理するプロセス管理手段と、を有する装置において、
処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し(ステップ1)、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ(ステップ2)、再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合に、当該プロセスを停止させ、プロセス管理装置に停止通知を送信し(ステップ3)、
プロセス管理手段は、
運用者からの再起動通知に応じてまたは定期的に、同時再起動数に応じて(ステップ4)、同時再起動数分の処理手段を選択して(ステップ5)、各処理手段に停止を指示し(ステップ6)、
プロセス管理手段から停止を指示された処理手段は、
プロセスを停止させ、プロセス管理手段に停止通知を送信し(ステップ7)、
前記プロセス管理手段は、停止させた処理手段に再起動を指示し(ステップ8)、
前記プロセス管理手段から再起動を指示された処理手段は、
プロセスを再起動させて(ステップ9)該プロセス管理手段に再起動完了通知を送信する(ステップ10)。
The present invention (Claim 4) is a memory leak handling method for providing a service while dealing with a memory release leak (hereinafter referred to as a memory leak) due to software quality,
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
In an apparatus having process management means for managing processing means groups,
The processing means is
One queue management means is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management means (step 1), and a process according to the data is executed. Increase (or decrease) the value of the restart counter according to the risk of leak (Step 2), and if the value of the restart counter exceeds (or falls below) a preset reference value Stop the process, send a stop notification to the process management device (step 3),
Process management means
Depending on the restart notification from the operator or periodically, according to the number of simultaneous restarts (step 4), processing means for the number of simultaneous restarts are selected (step 5), and each processing means is stopped. Instruct (step 6),
The processing means instructed to stop by the process management means is
Stop the process, send a stop notification to the process management means (step 7),
The process management means instructs the stopped processing means to restart (step 8),
The processing means instructed to restart from the process management means,
The process is restarted (step 9), and a restart completion notice is transmitted to the process management means (step 10).

本発明(請求項5)は、ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理方法であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
処理手段群を管理するプロセス管理手段と、を有する装置において、
処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ、再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合に、当該プロセスを停止し、プロセス管理手段に停止通知を送信する停止制御ステップを行い、
プロセス管理手段は、
処理手段から停止通知を受信すると共に、実行中の処理手段の数をカウントし、予め設定された管理対象処理手段の数に満たなければ不足分の処理手段を起動させる起動指示を行う起動制御ステップを、該処理手段からの停止通知を受信するまで、または、定期的に行い、
処理手段は、
プロセス管理手段から起動指示があるとプロセスを起動させ、該プロセス管理手段に起動完了通知を送信する。
The present invention (Claim 5) is a memory leak handling method for providing a service while dealing with a memory release leak (hereinafter referred to as a memory leak) due to software quality,
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
In an apparatus having process management means for managing processing means groups,
The processing means is
When one queue management unit is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit, and a process corresponding to the data is executed, a resource leak occurs depending on the process or data. Increase (or decrease) the value of the restart counter according to the risk. If the value of the restart counter exceeds (or falls below) a preset reference value, the process is stopped and the process management means A stop control step to send a stop notification to
Process management means
A start control step for receiving a stop notification from the processing means, counting the number of processing means being executed, and instructing a start to start the insufficient processing means if the number of processing target processing means set in advance is not reached Until the stop notification is received from the processing means or periodically,
The processing means is
When an activation instruction is issued from the process management means, the process is activated, and an activation completion notification is transmitted to the process management means.

また、本発明(請求項6)は、請求項4または5の処理手段において、
外部から入力された少なくとも1つ以上のサービスを実現するスクリプトを処理IDと対応させて記憶手段に格納しておき、
キュー管理手段から取得したデータもしくはデータを取得したキュー管理手段に直接的または間接的に付随する処理IDに基づいて記憶手段からスクリプトを取得して各サービス用処理モジュールを組み合わせて実行する。
The present invention (Claim 6) is the processing means according to Claim 4 or 5,
A script that realizes at least one service input from the outside is stored in the storage means in association with the process ID,
Based on the data acquired from the queue management means or the processing ID directly or indirectly associated with the queue management means that acquired the data, a script is acquired from the storage means, and the processing modules for each service are combined and executed.

本発明(請求項7)は、請求項1乃至3のいずれか1項に記載のメモリリーク対応装置の各手段としてコンピュータを機能させるためのメモリリーク対応処理プログラムである。   The present invention (Claim 7) is a memory leak handling program for causing a computer to function as each means of the memory leak handling apparatus according to any one of Claims 1 to 3.

本発明(請求項8)は、請求項7記載のメモリリーク対応処理プログラムを格納したことを特徴とするコンピュータ読み取り可能な記録媒体である。   The present invention (invention 8) is a computer-readable recording medium in which the memory leak handling processing program according to claim 7 is stored.

上記のように本発明によれば、サービスを実現するプロセス(処理手段)群が複数存在し、その中の一部プロセス群の再起動を常態化することによって、メモリリークのあるソフトウェアを使って、継続的なサービスを実現することが可能になる。   As described above, according to the present invention, there are a plurality of process (processing means) groups for realizing a service, and by restarting some of the process groups, normal use of software having a memory leak is possible. It becomes possible to realize continuous service.

また、個別のアプリケーション・プログラムに特化したサービス停止確認の方法を用意する必要がなく、汎用的であり、自動化が可能である。   In addition, there is no need to prepare a service stop confirmation method specialized for individual application programs, which is general-purpose and can be automated.

さらに、処理モジュール毎に、再起動カウンタの増減値を調整すれば、メモリリークの程度や頻度が異なる処理が混在していても、プロセスの処理内容に応じたメモリリーク解放が可能になり、無駄なプロセスのリブートを避けることが可能になる。(ここで、現プロセスのメモリリーク量の観測手段等を組み合わせて、より再起動のタイミングを最適化することも、本発明の応用の範囲として可能である。   Furthermore, by adjusting the increase / decrease value of the restart counter for each processing module, even if processes with different levels and frequencies of memory leaks are mixed, it is possible to release memory leaks according to the processing contents of the process, which is wasteful. It is possible to avoid rebooting the process. (Here, it is also possible to optimize the restart timing by combining observation means for the memory leak amount of the current process and the like as an application range of the present invention.

また、本発明は、一つのマシン内の複数のプロセスについて順に再起動を実施するため、マシン台数に関わらず、切り替え完了にかかる時間がほぼ一定という特徴を持ち、メモリリーク対処までの作業時間の見積がしやすい。よって、マシン台数が増えていく環境であっても、メモリリーク対処の間隔を一定に保ち易く、短時間のメモリリーク対応が可能になる。   In addition, since the present invention sequentially restarts a plurality of processes in one machine, it has a feature that the time required for completion of switching is almost constant regardless of the number of machines, and the work time until the memory leak countermeasure is reduced. Easy to estimate. Therefore, even in an environment where the number of machines increases, it is easy to keep the memory leak countermeasure interval constant, and it is possible to cope with memory leaks in a short time.

以上から、メモリリークの頻度が高い場合にも対応が可能になる。   From the above, it is possible to cope with a case where the frequency of memory leak is high.

また、ロードバランサのような集中管理サーバが処理のメインの流れ内には存在しないため、ボトルネックが発生しにくい。   In addition, since a central management server such as a load balancer does not exist in the main flow of processing, bottlenecks are unlikely to occur.

本発明では、マシンが1台の場合でも対処が可能で、かつ、複数台になった場合でも切り替えの方式が同一で理解し易い、という効果もある。   The present invention has an effect that it is possible to cope with even a single machine and that the switching method is the same and easy to understand even when there are a plurality of machines.

本発明の原理構成図である。It is a principle block diagram of this invention. 本発明の原理を説明するための図である。It is a figure for demonstrating the principle of this invention. 本発明の第1の実施の形態におけるシステム構成図である。It is a system configuration figure in a 1st embodiment of the present invention. 本発明の第1の実施の形態におけるキュー部の動作を示す図である。It is a figure which shows operation | movement of the queue part in the 1st Embodiment of this invention. 本発明の第1の実施の形態における処理マシンの処理部の動作を示す図である。It is a figure which shows operation | movement of the process part of the processing machine in the 1st Embodiment of this invention. 本発明の第1の実施の形態における処理マシンのプロセス管理部の動作を示す図である。It is a figure which shows operation | movement of the process management part of the processing machine in the 1st Embodiment of this invention. 本発明の第2の実施の形態におけるプロセス管理部の動作を示す図である。It is a figure which shows operation | movement of the process management part in the 2nd Embodiment of this invention. 本発明の一実施例におけるシステム構成図(その1)である。1 is a system configuration diagram (part 1) according to an embodiment of the present invention. FIG. 本発明の一実施例におけるシステム構成図(その2)である。It is a system configuration figure (the 2) in one example of the present invention. 従来のシステム構成図である。It is a conventional system configuration diagram.

以下、図面と共に本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

まず、本発明のアプローチの概要を示す。   First, an overview of the approach of the present invention is shown.

・OSからの再起動ではなく、アプリケーション・プログラムのプロセス(以下、単に、「プロセス」や「アプリケーション・プロセス」と呼ぶこともある)の自立的もしくは定時的もしくは運用者指示により再起動により、プロセスのメモリリークの解放を実施する。   -The process is not a restart from the OS, but a process of an application program (hereinafter sometimes simply referred to as "process" or "application process"), either autonomously or on a regular basis, or restarted by an operator instruction. Release memory leaks.

・アプリケーション・プロセスは、同一の機能のプロセスを同一マシン内で複数実行させておくことで、1プロセスが停止してもサービスは停止しない状態を作る。   ・ Application processes can execute multiple processes with the same function in the same machine, so that the service will not stop even if one process stops.

・アプリケーション・プロセスは、複数(多数)のマシンで実行させておくことで、サービスのスケーラビリティを維持することを可能にする。同時に、サービスの受付口を複数持つことで、LBのようなシングルポイントのボトルネックを発生することを避ける。   -The application process can be executed on a plurality of (many) machines to maintain the scalability of the service. At the same time, by having a plurality of service reception ports, a single point bottleneck such as LB is avoided.

・アプリケーション・プロセスは、特定機能の実行や特定データの処理に応じて、カウンタをアップさせて、カウンタが閾値を越えた段階で停止することで、メモリリークの解放を行う。   The application process releases the memory leak by increasing the counter according to the execution of the specific function or the processing of the specific data, and stopping when the counter exceeds the threshold value.

また、1つのアプリケーション・プロセスが、複数のサービス用のアプリケーション・プログラムを内包し、外部からの条件によって実行する処理内容を切り替えて異なるサービスとしての挙動を行うという構成を許容している。このため、サービス種別毎や、サービスの実行時に処理が流れるルート毎に、メモリリーク量が異なるという問題もある。この場合でもアプリケーション・プロセスの再起動回数も最低限にすることも行う。   In addition, a configuration in which one application process includes a plurality of service application programs and switches the processing contents to be executed according to external conditions to perform different service behaviors is allowed. For this reason, there is a problem in that the amount of memory leak differs for each service type and for each route through which processing flows during service execution. Even in this case, the number of restarts of the application process is also minimized.

そのため、特定の処理モジュールが一定実行回数実行された後、もしくは、残メモリ量に応じて自動的に再起動を実行することも行う。   For this reason, after a specific processing module has been executed a certain number of times, or automatically according to the remaining memory amount.

[第1の実施の形態]
図3は、本発明の第1の実施の形態におけるシステム構成を示す。
[First embodiment]
FIG. 3 shows a system configuration in the first embodiment of the present invention.

同図に示すシステムは、少なくとも2つ以上のキュー部20〜20と、少なくとも2つ以上の処理マシン30〜30から構成される。なお、当該処理マシン30は、図10に示すACTサーバであるものとする。 The system shown in the figure includes at least two or more queue units 20 1 to 20 j and at least two or more processing machines 30 1 to 30 m . It is assumed that the processing machine 30 is an ACT server shown in FIG.

各キュー部20〜20は、外部から受け付けたデータを、キュー領域にキューイングする。 Each of the queue units 20 1 to 20 j queues data received from the outside in a queue area.

処理マシン30〜30は、それぞれ、各処理マシン30毎に1つのプロセス管理部31〜31と、少なくとも2つ以上存在する処理部3211〜32mkを有する。 Each of the processing machines 30 1 to 30 m includes one process management unit 31 1 to 31 m for each processing machine 30 and at least two processing units 32 11 to 32 mk .

本実施の形態では、プロセス管理部31が、運用者からの通知や提示通知等の外部トリガを元に、処理部32を再起動させる場合を説明する。   In the present embodiment, a case will be described in which the process management unit 31 restarts the processing unit 32 based on an external trigger such as a notification from an operator or a presentation notification.

図4、図5、図6は、本発明の第1の実施の形態における各構成要素の動作を示す図であり、図4は、キュー部20〜20、図5は処理部3211〜32mk、図6はプロセス管理部31〜31の各動作を示す。 4, 5, and 6 are diagrams illustrating the operation of each component according to the first embodiment of the present invention. FIG. 4 illustrates the queue units 20 1 to 20 n , and FIG. 5 illustrates the processing unit 32 11. .About.32 mk , FIG. 6 shows each operation of the process management units 31 1 to 31 m .

各キュー部20〜20は、追記クライアント10からのデータを受け付け(図4:Q‐AC‐1)、キュー領域へのデータを追加する(図4:Q-AC-2)。 Each of the queue units 20 1 to 20 n receives data from the write-once client 10 (FIG. 4: Q-AC-1) and adds data to the queue area (FIG. 4: Q-AC-2).

各処理マシン30〜30のプロセス管理部31〜31は、運用者による処理部32の再起動通知を受信、もしくは定時まで待機し(図6:MM-1)各処理マシン30〜30内の処理部3211〜32mk群を管理し(図6:MM-2)、同時再起動数(図6:D-3)に応じて、同時再起動数分の処理部32を選択して各処理部32に停止を指示し(図6:MM-3)、停止させた数分の処理部32を再起動させ(図6:MM-4)、再起動後の処理部32からの再起動完了通知を受信する(図6:MM-5)。各プロセス管理部31〜31は、上記の処理を全ての処理部32について実施し(図6:MM-6)、当該処理を運用者から再起動通知に応じて、または、定期的に繰り返す。 Process management unit 31 1 to 31 m of the processing machine 30 1 to 30 m waits for the restart notification processing unit 32 by the operator received or until scheduled (Figure 6: MM-1) each of the processing machine 30 1 The processing units 32 11 to 32 mk within ˜30 m are managed (FIG. 6: MM-2), and the processing units 32 corresponding to the number of simultaneous restarts according to the number of simultaneous restarts (FIG. 6: D-3). Is selected to instruct each processing unit 32 to stop (FIG. 6: MM-3), the number of the stopped processing units 32 are restarted (FIG. 6: MM-4), and the processing units after the restart Reboot completion notification is received from 32 (FIG. 6: MM-5). Each of the process management units 31 1 to 31 m performs the above processing on all the processing units 32 (FIG. 6: MM-6), and performs the processing according to a restart notification from the operator or periodically. repeat.

また、各処理マシン30の各処理部32は、プロセスの起動(再起動完了通知)をプロセス管理部31に通知し(図5:F-1)、再起動カウンタをゼロクリアする(図5:F-2)。任意のアルゴリズムによって1つのキュー部20を選択し(図5:F-3)、キュー部20に対してデータ取得要求を送る。キュー部20は、データ取得要求を受け付け(図4:Q-F-1)、処理中フラグのないデータ群中で古いデータからデータを選択し、処理中フラグを付与した後、要求元の処理部32に送信する(図4:Q-F-2)。キュー部20は、この後、処理中のデータについてタイムアウト監視し、タイムアウトしたら処理中フラグを削除する(図4:Q-F-3)。   Each processing unit 32 of each processing machine 30 notifies the process management unit 31 of process activation (restart completion notification) (FIG. 5: F-1), and clears the restart counter to zero (FIG. 5: F). -2). One queue unit 20 is selected by an arbitrary algorithm (FIG. 5: F-3), and a data acquisition request is sent to the queue unit 20. The queue unit 20 accepts the data acquisition request (FIG. 4: QF-1), selects data from the old data in the data group without the processing flag, assigns the processing flag, and then processes the requesting processing unit 32. (Fig. 4: QF-2). Thereafter, the queue unit 20 monitors the time-out for the data being processed, and deletes the in-process flag when time-out occurs (FIG. 4: Q-F-3).

処理部32は、キュー部20からデータを少なくとも1件以上取得し(図5:F-4)、データに応じた処理を実行する(図5:F5)。ここで、データには情報源IDが付与され、その情報源IDに応じた処理が定義されており、その処理が実行されるものとする。処理部32は、再起動カウンタを有し、処理実行の際、処理もしくはデータに応じてリソースリークが発生するリスクに応じて再起動カウンタの値を増加(もしくは減少)させ(図5:F-6)、キュー部20に対して処理完了を通知する(図5:F-7)。キュー部20は、処理部32からデータ処理完了通知を受け付け(図4:Q-F-4)、キュー領域から対象データを削除する(図4:Q-F-5)。   The processing unit 32 acquires at least one piece of data from the queue unit 20 (FIG. 5: F-4) and executes a process according to the data (FIG. 5: F5). Here, it is assumed that an information source ID is assigned to the data, a process corresponding to the information source ID is defined, and the process is executed. The processing unit 32 has a restart counter, and increases (or decreases) the value of the restart counter according to the risk of resource leaks depending on the process or data when the process is executed (FIG. 5: F− 6) The processing completion is notified to the queue unit 20 (FIG. 5: F-7). The queue unit 20 receives a data processing completion notification from the processing unit 32 (FIG. 4: Q-F-4), and deletes the target data from the queue area (FIG. 4: Q-F-5).

処理部32は、再起動カウンタが事前に設定される基準値を超えた(もしくは下回った)場合に(図5:F-8)、そのプロセスを停止する(図5:F-10)。なお、プロセスを停止する前に、プロセス管理部31に対して停止通知を送信してもよい(図5:F-9)。   When the restart counter exceeds (or falls below) a preset reference value (FIG. 5: F-8), the processing unit 32 stops the process (FIG. 5: F-10). Note that a stop notification may be transmitted to the process management unit 31 before the process is stopped (FIG. 5: F-9).

なお、各処理部3211〜32mkに組み込まれる処理モジュール群は等価である。 Each processor 32 11-32 processing modules incorporated in mk are equivalent.

上記の一連上記の処理により、メモリリーク対応処理モジュールの連続運転を行う。これにより、運用者の指示や定期的なタイミングに応じて、処理部32の再起動が順に実行され、順にメモリリークが解放されると共に、残った処理部32でサービス継続が可能となる。   Through the above series of processes, the memory leak handling module is continuously operated. Thereby, the restart of the processing unit 32 is executed in order according to the operator's instruction and periodic timing, the memory leak is released in order, and the remaining processing unit 32 can continue the service.

[第2の実施の形態]
本実施の形態では、処理マシン30のプロセス管理部31が実行中の処理部32の数を監視し、処理部32を自動充足させる場合について説明する。
[Second Embodiment]
In the present embodiment, a case will be described in which the process management unit 31 of the processing machine 30 monitors the number of processing units 32 being executed and automatically satisfies the processing units 32.

本実施の形態におけるシステム構成は前述の第1の実施の形態と同様であるので、その説明は省略する。   Since the system configuration in this embodiment is the same as that of the first embodiment described above, description thereof is omitted.

図7は、本発明の第2の実施の形態における処理マシンの動作を説明するための図である。   FIG. 7 is a diagram for explaining the operation of the processing machine according to the second embodiment of the present invention.

プロセス管理部31は、各マシン30内で実行中の処理部32の数を監視し(図7:MA-2)、管理対象の処理部の数(図7:D-2)に満たなければ不足分の処理部32を起動し(図7:MA-3)、それをマシン30内の処理部32からの停止通知の受信毎(図7:MA-1)、もしくは、定期的に繰り返す。   The process management unit 31 monitors the number of processing units 32 being executed in each machine 30 (FIG. 7: MA-2), and if the number is not less than the number of processing units to be managed (FIG. 7: D-2). The insufficiency processing unit 32 is activated (FIG. 7: MA-3), and is repeated every time a stop notification is received from the processing unit 32 in the machine 30 (FIG. 7: MA-1) or periodically.

また、各処理マシン30の各処理部32は、プロセス管理部31から起動が指示されると、プロセスを起動させ、起動完了通知をプロセス管理部31に送信し(図5:F-1)、再起動カウンタをゼロクリアし(図5:F-2)任意のアルゴリズムによって1つのキュー部20を選択し(図5:F-3)、キュー部20に対してデータ要求を送る。キュー部20は、データ取得要求を受け付け(図4:Q-F-1)、処理中フラグのないデータ群中で古いデータからデータを選択し、処理中フラグを付与した後、要求元の処理部32に送信する(図4:Q-F-2)。キュー部20は、この後、処理中のデータについてタイムアウトを監視し、タイムアウトしたら処理中フラグを削除する(図4:Q-F-3)。   Each processing unit 32 of each processing machine 30 starts the process when the process management unit 31 is instructed to start, and sends a start completion notification to the process management unit 31 (FIG. 5: F-1). The restart counter is cleared to zero (FIG. 5: F-2), one queue unit 20 is selected by an arbitrary algorithm (FIG. 5: F-3), and a data request is sent to the queue unit 20. The queue unit 20 accepts the data acquisition request (FIG. 4: QF-1), selects data from the old data in the data group without the processing flag, assigns the processing flag, and then processes the requesting processing unit 32. (Fig. 4: QF-2). Thereafter, the queue unit 20 monitors the time-out for the data being processed, and deletes the in-process flag when time-out occurs (FIG. 4: Q-F-3).

処理部32は、キュー部20からデータを少なくとも1件以上取得し(図5:F-4)、データに応じた処理を実行する(図5:F5)。ここで、データには情報源IDが付与され、その情報源IDに応じた処理が定義されており、その処理が実行されるものとする。その際、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値増加(もしくは減少)を行い(図5:F-6)、キュー部20に対して処理完了を通知する(図5:F-7)。キュー部20は、処理部32からデータ処理完了通知を受け付け(図4:Q-F-4)、キュー領域から対象データを削除する(図4:Q-F-5)。   The processing unit 32 acquires at least one piece of data from the queue unit 20 (FIG. 5: F-4) and executes a process according to the data (FIG. 5: F5). Here, it is assumed that an information source ID is assigned to the data, a process corresponding to the information source ID is defined, and the process is executed. At that time, the restart counter value is increased (or decreased) in accordance with the risk of resource leaks depending on the processing or data (FIG. 5: F-6), and the processing completion is notified to the queue unit 20. (Figure 5: F-7). The queue unit 20 receives a data processing completion notification from the processing unit 32 (FIG. 4: Q-F-4), and deletes the target data from the queue area (FIG. 4: Q-F-5).

処理部32は、再起動カウンタが事前に設定される基準値を超えた(もしくは下回った)場合に(図5:F-8)、そのプロセスを停止する(図5:F-10)。なお、プロセスを停止する前に、プロセス管理部31に対して停止通知を送信してもよい(図5:F-9)。   When the restart counter exceeds (or falls below) a preset reference value (FIG. 5: F-8), the processing unit 32 stops the process (FIG. 5: F-10). Note that a stop notification may be transmitted to the process management unit 31 before the process is stopped (FIG. 5: F-9).

なお、各処理部3211〜32mkに組み込まれる処理モジュール群は等価である。 Each processor 32 11-32 processing modules incorporated in mk are equivalent.

上記の一連上記の処理により、メモリリーク対応処理モジュールの連続運転を行う。これにより、処理部32の再起動のためのカウンタ値が特定値を超えた場合に、処理部32が停止するのに応じて再起動が自動的に実行され、順にメモリリークが開放されると共に、残った処理部32でサービス継続が可能となる。   Through the above series of processes, the memory leak handling module is continuously operated. As a result, when the counter value for restarting the processing unit 32 exceeds a specific value, the restarting is automatically executed according to the stop of the processing unit 32, and the memory leak is sequentially released. The remaining processing unit 32 can continue the service.

以下に、本発明の実施例を示す。   Examples of the present invention are shown below.

図8、図9は、本発明の一実施例のシステム構成を示し、図8は、運用指示がある場合の例であり、運用者による運用指示と各プロセス管理部31による制御により再起動される例であり、図9は、キュー振り分けサーバを設けた構成であり、再起動はプロセス管理部31により行われ、停止タイミングは処理部32により制御される例である。   FIGS. 8 and 9 show the system configuration of an embodiment of the present invention. FIG. 8 shows an example when there is an operation instruction, which is restarted by an operation instruction by the operator and control by each process management unit 31. FIG. 9 shows an example in which a queue distribution server is provided. The restart is performed by the process management unit 31 and the stop timing is controlled by the processing unit 32.

以下の例において、データとしての制限は特に無く、例えば以下のようなものである。   In the following example, there is no particular limitation as data, for example, the following.

・RDBのレコード型やXML;
・ラージオブジェクト(CLOBやBLOB)や画像や音声などメディアデータ;
・システムのログや処理リクエスト;
・Webデータ、ライフログデータ、メールなど;
データベースやデータストリーム管理システムで扱う多様なデータ型について、本発明では同等に扱える。
-RDB record type and XML;
-Media data such as large objects (CLOB and BLOB), images and sounds;
System logs and processing requests;
・ Web data, life log data, e-mail, etc .;
Various data types handled by a database or a data stream management system can be handled equally in the present invention.

以下では、サービスが以下の2種類存在する場合の例を示すが、種類が増えても同様である。   In the following, an example in which there are the following two types of services is shown, but the same applies even if the types increase.

<サービス1>
人感センサに反応したら、横のカメラ映像をチェックし、そのとき画像に顔があったら、顔認識を行って、その人を特定し、社員であれば、社員DBに記録し、認識できなければ警報装置を起動する。
<Service 1>
If it reacts to the presence sensor, check the horizontal camera image, and if there is a face in the image at that time, perform face recognition to identify the person, and if it is an employee, it must be recorded in the employee DB and recognized. Activate the alarm device.

<サービス2>
監視カメラ映像を流し続ける。
<Service 2>
Continue to play surveillance camera video.

上記のサービスは後述する処理モジュールでそれら組み合わせるスクリプトで実現され、同一プロセスの中でスクリプトが切り替えられることで、各サービスが実行される。   The above services are realized by scripts combined with the processing modules described later, and each service is executed by switching the scripts in the same process.

情報源としては、以下の人感センサ(JINKAN)とWebカメラ映像(WEBCAM001)があったとする。なお、各入力レコードには、
・人感センサ:
情報源ID:JINKAN
出力:人感センサ値n(int)−人を感じれば「1」、人を感じなければ「0」
・Webカメラ映像;
情報源ID:WEBCAM001
出力:画像(jpeg)
また、処理モジュールとして、以下の顔検出(extractFace)、顔認識(recognitionFace)、社員DBへの登録(stioreDB)、警報装置を起動(alert)、端末にメッセージを出力(message),
ファイルを保存(saveAs)、入力レコードのカラム値参照(Get)、情報源の最新レコード参照(Read)が処理部32内に組み込まれているとする。
Assume that there are the following human sensor (JINKAN) and Web camera video (WEBCAM001) as information sources. Each input record contains
・ Human sensor:
Information source ID: JINKAN
Output: Human sensor value n (int)-“1” if a person is felt, “0” if a person is not felt
・ Web camera video;
Information source ID: WEBCAM001
Output: Image (jpeg)
As processing modules, the following face detection (extractFace), face recognition (recognitionFace), registration in employee DB (stioreDB), activation of alarm device (alert), message output to terminal (message),
It is assumed that the file is saved (saveAs), the column value reference (Get) of the input record, and the latest record reference (Read) of the information source are incorporated in the processing unit 32.

●顔検出(顔数の取得)
名称:countFaces()
引数:画像(jpeg)
出力:顔数(int)
●顔検出(顔画像配列の取得)
名称:extraceFace()
引数:画像(jpeg)
出力:顔画像(jpeg)
●顔認識
名称:recognitionFace()
引数:顔画像(jpeg)
出力:顔が認識できた場合には社員コード(string)
顔が認識できなかった場合にはNULL文字列
●社員DBへの登録
名称:storeDB()
引数:社員コード
時刻
出力:なし
●警報装置を起動
名称:altert()
引数:警報秒数n(int)
出力:なし
●端末にメッセージを出力
名称:message()
引数:文字列
出力:なし
●ファイルを保存
名称:saveAs()
引数:保存先パス
保存対象
出力:なし
●入力レコードのカラム値参照
名称:get()
引数:入力レコードのカラム
出力:入力レコードのカラム値
●情報源の最新レコード参照
名称:readLatest();
引数:情報源ID
情報源IDのカラム
出力:情報源IDの指定カラムの最新カラム値
上記の処理モジュールをスクリプトによって組み合わせることによって構成されるサービス用のアプリケーション・プログラムとして、以下のような<APPLICATION_PROGRAM1>と<APPLICATION_PROGRAM2>があったとする。これらは前述のサービス1、サービス2の実装にそれぞれ対応する。なお、以下のスクリプトは独自の擬似コードで記述しているが,同等のプログラミング言語であって構わない。
● Face detection (Face number acquisition)
Name: countFaces ()
Argument: Image (jpeg)
Output: Number of faces (int)
● Face detection (Face image array acquisition)
Name: extraceFace ()
Argument: Image (jpeg)
Output: Face image (jpeg)
● Face recognition Name: recognitionFace ()
Argument: face image (jpeg)
Output: If the face can be recognized, employee code (string)
NULL string if face could not be recognized ● Registration in employee DB Name: storeDB ()
Argument: Employee code Time Output: None ● Start alarm device Name: altert ()
Argument: Alarm seconds n (int)
Output: None ● Output a message to the terminal Name: message ()
Argument: String Output: None ● Save file Name: saveAs ()
Argument: Save destination path
Save target Output: None ● Refer to column value of input record Name: get ()
Argument: Input record column Output: Input record column value ● Reference to the latest record of the information source Name: readLatest ();
Argument: Information source ID
Information source ID column Output: Latest column value of specified column of information source ID The following <APPLICATION_PROGRAM1> and <APPLICATION_PROGRAM2> are provided as service application programs configured by combining the above processing modules with scripts. Suppose there was. These correspond to the implementation of the service 1 and service 2 described above. The following script is written in its own pseudo code, but it may be an equivalent programming language.

<APPLICATION_PROGRAM1>
APPLICATION_PROGRAM1 = {
int T; // 入力レコードの時刻値
int R; // 入力レコードの人感センサ値
int T = get(JINKAN, Time); // 時刻値の取得
int R = get(JINKAN, Image); // 人感センサの状態取得
if ( R == 0 ) { // 人感センサに反応しなかったらイベント終了
return;
}
else { // 人感センサに反応したら
jpeg J;
J = readLatest( WEBCAM001); // 横のWebカメラの画像を参照
int num_Face;
num_Face = countFaces( J);
if ( num_Face <= 1 ) { // 人感センサに反応があるが顔が映っていない
message( "感知したけど顔はなし");
return;
}
else { // 人感センサが反応して,顔が映っていた
int Faces[]; // 配列
Faces = extractFaces(J);
for( int i=0; i<num_Face; i++) { // 顔数分,社員か否かチェック
string C;
C = recognitionFace( Faces[i]);
if ( C != NULL ) { //社員であれば,社員DBに記録
storeDB( C, T);
}
else { // 社員以外の顔が映っていた
message("警報 未知の人物検出")
alert( 3); // 警報を3秒
}
}
return;
}
}
}
<APPLICATION_PROGRAM2>
APPLICATION_PROGRAM2 = {
int T; // 入力レコードの時刻値
int J; // 入力レコードの人感センサ値
int T = get( WEBCAM001, Time); // 時刻値の取得
int J = get( WEBCAM001, Image); // カメラ映像の状態取得
saveAs( "/var/www/html/camlog/${T}.jpg", J);
return;
}
このとき処理として<APPLICATION_PROGRAM1>は、人感センサに反応したら、横のカメラ映像WEBCAM001をチェックし、そのとき画像に顔があったら、顔認識を行ってその人を特定し、社員であれば、社員DBに記録し、認識できなければ、警報装置を3秒間起動という処理である。
<APPLICATION_PROGRAM1>
APPLICATION_PROGRAM1 = {
int T; // Time value of the input record
int R; // Human sensor value of the input record
int T = get (JINKAN, Time); // Get time value
int R = get (JINKAN, Image); // Get human sensor status
if (R == 0) {// End the event if there is no response to the human sensor
return;
}
else {// If it reacts to a human sensor
jpeg J;
J = readLatest (WEBCAM001); // Refer to the image of the next webcam
int num_Face;
num_Face = countFaces (J);
if (num_Face <= 1) {// The human sensor has a response but no face
message ("Detected but no face");
return;
}
else {// The human sensor responded and the face was reflected
int Faces []; // array
Faces = extractFaces (J);
for (int i = 0; i <num_Face; i ++) {// Check if the number of faces is an employee
string C;
C = recognitionFace (Faces [i]);
if (C! = NULL) {// If employee, record in employee DB
storeDB (C, T);
}
else {// Faces other than employees were reflected
message ("Alarm unknown person detection")
alert (3); // alert for 3 seconds
}
}
return;
}
}
}
<APPLICATION_PROGRAM2>
APPLICATION_PROGRAM2 = {
int T; // Time value of the input record
int J; // Human sensor value of the input record
int T = get (WEBCAM001, Time); // Get time value
int J = get (WEBCAM001, Image); // Get camera video status
saveAs ("/var/www/html/camlog/${T}.jpg", J);
return;
}
At this time, as a process, <APPLICATION_PROGRAM1> checks the horizontal camera image WEBCAM001 when it reacts to the human sensor, and if there is a face in the image at that time, it performs face recognition and identifies that person. If it is recorded in the employee DB and cannot be recognized, the alarm device is activated for 3 seconds.

また、このとき処理として<APPLICATION_PROGRAM2>は、Webカメラの映像の時刻をファイル名とする画像としてhtmlディレクトリ配下に保存する処理である。   Further, at this time, <APPLICATION_PROGRAM2> is a process of saving under the html directory as an image having the video camera time as a file name.

これら<APPLICATION_PROGRAM1>、<APPLICATION_PROGRAM2>は図5のF-5に対応する。   These <APPLICATION_PROGRAM1> and <APPLICATION_PROGRAM2> correspond to F-5 in FIG.

このとき、顔認識処理である「recognitionFace」とDBへの投入処理である「storeDB」にメモリリークがそれぞれ残っており、「recognitionFace」は100回実行される毎に再起動するのが概ね安全と仮定し、storeDBは5000回実行される毎に再起動するのが概ね安全だったと仮に想定する。   At this time, memory leaks remain in “recognitionFace” which is the face recognition process and “storeDB” which is the input process to the DB, and it is generally safe to restart “recognitionFace” every time it is executed 100 times. Assuming that storeDB was generally safe to restart after every 5000 executions.

その場合、処理部32は、「recognitionFace」は「storeDB」の50倍メモリリーク量が多いと判断し、「recognitionFace」の1回の実行に対して再起動カウンタの+50を「storeDB」の1回の実行に対して再起動カウンタの+1を行い(図5:F‐6)、再起動カウンタの値が5000を超えたら再起動する(図5:F‐8,F‐10)ように指定するには、再起動カウンタのカウントアップ処理をrebootCountup()とした場合、以下の<APPLICATION_PROGRAM1'>のように「rebootCountup(50)」を追加する。なお、この上限値5000は別途何らかの方法(例えば、設定ファイル、起動パラメータ、スクリプトの宣言文など)でプロセスに指定してあるとする。   In this case, the processing unit 32 determines that “recognitionFace” has 50 times as much memory leak amount as “storeDB”, and sets the restart counter +50 once for “storeDB” for one execution of “recognitionFace”. The restart counter is incremented by 1 (Fig. 5: F-6) and the restart counter value exceeds 5000 (Fig. 5: F-8, F-10). If rebootcountup processing is set to rebootCountup (), “rebootCountup (50)” is added as shown in <APPLICATION_PROGRAM1 ′> below. It is assumed that this upper limit value 5000 is specified for the process by some other method (for example, a setting file, a startup parameter, a script declaration, etc.).

<APPLICATION_PROGRAM1'>
APPLICATION_PROGRAM1' = {
int T; // 入力レコードの時刻値
int R; // 入力レコードの人感センサ値
int T = get(JINKAN, Time); // 時刻値の取得
int R = get(JINKAN, Image); // 人感センサの状態取得
if ( R == 0 ) { // 人感センサに反応しなかったらイベント終了
return;
}
else { // 人感センサに反応したら
jpeg J;
J = readLatest( WEBCAM001); // 横のWebカメラの画像を参照
int num_Face;
num_Face = countFaces( J);
if ( num_Face <= 1 ) { // 人感センサに反応があるが顔が映っていない
message( "感知したけど顔はなし");
return;
}
else { // 人感センサが反応して,顔が映っていた
int Faces[]; // 配列
Faces = extractFaces(J);
rebootCountup(50)
for( int i=0; i<num_Face; i++) { // 顔数分,社員か否かチェック
string C;
C = recognitionFace( Faces[i]);
if ( C != NULL ) { //社員であれば,社員DBに記録
storeDB( C, T);
rebootCountup(1)
}
else { // 社員以外の顔が映っていた
message("警報 未知の人物検出")
alert( 3); // 警報を3秒
}
}
return;
}
}
}
<APPLICATION_PROGRAM1'>と<APPLICATION_PROGRAM2>は、図8、図9の各処理部3211〜32mkの各々の中に、何らかの契機(起動や運用者通知など)によって読み込まれている。
<APPLICATION_PROGRAM1 '>
APPLICATION_PROGRAM1 '= {
int T; // Time value of the input record
int R; // Human sensor value of the input record
int T = get (JINKAN, Time); // Get time value
int R = get (JINKAN, Image); // Get human sensor status
if (R == 0) {// End the event if there is no response to the human sensor
return;
}
else {// If it reacts to a human sensor
jpeg J;
J = readLatest (WEBCAM001); // Refer to the image of the next webcam
int num_Face;
num_Face = countFaces (J);
if (num_Face <= 1) {// The human sensor has a response but no face
message ("Detected but no face");
return;
}
else {// The human sensor responded and the face was reflected
int Faces []; // array
Faces = extractFaces (J);
rebootCountup (50)
for (int i = 0; i <num_Face; i ++) {// Check if the number of faces is an employee
string C;
C = recognitionFace (Faces [i]);
if (C! = NULL) {// If employee, record in employee DB
storeDB (C, T);
rebootCountup (1)
}
else {// Faces other than employees were reflected
message ("Alarm unknown person detection")
alert (3); // alert for 3 seconds
}
}
return;
}
}
}
<APPLICATION_PROGRAM1 '> and <APPLICATION_PROGRAM2> are read into each of the processing units 32 11 to 32 mk in FIGS. 8 and 9 for some reason (startup, operator notification, etc.).

情報源「JINKAN」と「WEBCAM001」は、追記クライアント10〜10によっていずれかのキュー部20に追記される。 The information sources “JINKAN” and “WEBCAM001” are added to one of the queue units 20 by the additional recording clients 10 1 to 10 x .

この例では追記クライアント10が「JINKAN」の情報をキュー部201のキュー2に、追記クライアント10が「WEBCAM001」の情報をキュー部20nのキューnに連続して追記し続けているとする。 Information additional recording client 10 1 is "JINKAN" in queue 2 queue unit 20 1 in this example, additional recording client 10 2 continue to append continuously information "WEBCAM001" queue n of the queue unit 20 n And

これらを、図4〜図7のフローチャートと対応付けて説明する。   These will be described in association with the flowcharts of FIGS.

まず、人感センサJINKANのデータは、例えば毎秒、追記クライアント10によって取得(図4:Q-AC-1)され、キュー部20のキュー2にデータ追加(図4:Q-AC-2)され続ける。 First, the data of the motion sensor JINKAN, for example every second, obtained by additional recording client 10 1 (Figure 4: Q-AC-1) is, the data added to the queue 2 in the queue section 20 1 (Figure 4: Q-AC-2 ) Will continue.

同様に、Webカメラ「WEBCAM001」の画像データは、例えば、秒4フレームで追記クライアント10によって取得(図4:Q-AC-1)され、キュー部20nのキューnにデータ追記(図4:Q-AC-2)され続ける。 Similarly, the image data of the web camera “WEBCAM001” is acquired by the appending client 102 (FIG. 4: Q-AC-1), for example, at 4 frames per second (FIG. 4: Q-AC-1), and the data is appended to the queue n of the queue unit 20n (FIG. 4: Q-AC-2) will continue.

処理部3211〜32mkの各々は、まず、プロセス管理部31によって起動され(図5:F-1)、後に使う再起動カウンタを0クリアして、プロセスの空間内に保持し、停止するまで以下の過程(図5:F-3〜F-8)を繰り返す。 Each of the processing units 32 11 to 32 mk is first activated by the process management unit 31 (FIG. 5: F-1), clears a restart counter to be used later, holds it in the process space, and stops. Repeat the following process (Figure 5: F-3 to F-8).

まず、システム内に存在する複数のキュー部20の中から任意の1つを選択(図5:F-3)する。この選択手法はラウンドロビンのような単純なものであっても,確率を使った高度な方法であっても構わない。   First, an arbitrary one is selected from a plurality of queue units 20 existing in the system (FIG. 5: F-3). This selection method may be a simple method such as round robin or an advanced method using probability.

ここで選択したキュー部20は「JINKAN」のデータが追記されているキュー2だったとする。   It is assumed that the queue unit 20 selected here is the queue 2 in which the data “JINKAN” is additionally written.

これに対応するキュー2側の処理は、各処理部32からのデータ取得要求(図4:Q-F-1)を受付け、キュー2上の処理中フラグのないデータ群の中で最も古いデータを選択し、キュー2上に処理中フラグをつけた後、要求元の処理部32に送信(図4:Q-F-2)し、要求元の処理部32の停止等に備えて、処理中データについて、タイムアウト監視を設定(図4:Q-F-3)して、次の処理部32からの要求を待つ処理に戻る。この処理部を例えば処理部3223として以下説明する。 The corresponding processing on the queue 2 side receives a data acquisition request (FIG. 4: QF-1) from each processing unit 32, and selects the oldest data in the data group without a processing flag on the queue 2. Then, after the processing flag is put on the queue 2, it is transmitted to the request source processing unit 32 (FIG. 4: QF-2), and in preparation for the stop of the request source processing unit 32, The timeout monitoring is set (FIG. 4: QF-3), and the process returns to the process of waiting for a request from the next processing unit 32. This will be described below a process unit for example as a processing unit 32 23.

処理部3223は、選択したキュー2からのデータ送信(図4:Q-F-2)を受けて、1件データを取得する(図5:F-4)。 Processing unit 32 23, the data transmission (Figure 4: QF-2) from the queue 2 selected receiving acquires 1 data (Fig 5: F-4).

ここで「JINKAN」情報源から来たデータには、<APPLICATION_PROGRAM1'>を適用するという情報が事前に定義されているとし、先に示した擬似コードの<APPLICATION_PROGRAM1'>が実行(図5:F-5)され、その中で、再起動カウンタのカウントアップ(図5:F-6)が行われる。   Here, it is assumed that the information that <APPLICATION_PROGRAM1 '> is applied in advance to the data coming from the “JINKAN” information source, and the above-described pseudo code <APPLICATION_PROGRAM1'> is executed (FIG. 5: F -5), and the restart counter is counted up (FIG. 5: F-6).

<APPLICATION_PROGRAM1'>が完了した後、キュー部20への処理完了を通知(F−7)し、それに対応して、キュー部20のキュー2では、当該の処理部3223からのデータ処理完了通知を受付(図4:Q-F-4)、対象データの処理中フラグの削除と、対象データのキュー上からの削除(図4:Q-F-5)を行う。 <APPLICATION_PROGRAM1 '> After the completed, notifies the completion of processing to the queue unit 20 (F-7), and correspondingly, the queue 2 in the queue unit 20, a data processing completion notification from the processing unit 32 23 (FIG. 4: QF-4), delete the processing flag of the target data and delete the target data from the queue (FIG. 4: QF-5).

キュー部20への処理完了を通知(図5:F-7)した処理部3223では、事前に何らかの方法で指定された再起動の基準値を持ち、プロセス内に保有する再起動カウンタの値がその基準値を超えたか、を判断(F−8)し、越えていなければ、再度、接続先のキュー部20の選択(図5:F-3)を行う。このとき、先ほどと同じキュー2が選択されれば、同様に<APPLICATION_PROGRAM1'>が実行されるが、別のキュー部20が選択されることもある。 Notification of the completion of processing of the queue section 20 (FIG. 5: F-7) was the processing unit 32 23 has a pre-reference value of the restart as specified in any way, the value of the restart counter held in the process (F-8), the connection destination queue unit 20 is selected again (FIG. 5: F-3). At this time, if the same queue 2 as before is selected, <APPLICATION_PROGRAM1 '> is executed in the same manner, but another queue unit 20 may be selected.

例えば、キュー部20nのキューnが選択されれば、<APPLICATION_PROGRAM2>が実行される。<APPLICATION_PROGRAM2>ではメモリリークの発生リスクに対応した「rebootCountup」は実行されないので、再起動カウンタはカウントアップされない。この再起動カウンタは処理部毎、つまり再起動単位であるプロセス毎に存在する。 For example, if the queue n of the queue unit 20 n is selected, <APPLICATION_PROGRAM2> is executed. In <APPLICATION_PROGRAM2>, “rebootCountup” corresponding to the risk of memory leak is not executed, so the reboot counter is not counted up. This restart counter exists for each processing unit, that is, for each process as a restart unit.

先の比較(図5:F-8)において、再起動カウンタが基準値の値を超えていた場合、停止通知を同一マシン上のプロセス管理部31に通知(F−9)し、処理部32のプロセスを停止(図5:F-10)する。   In the previous comparison (FIG. 5: F-8), if the restart counter exceeds the reference value, a stop notification is sent to the process management unit 31 on the same machine (F-9), and the processing unit 32 Is stopped (FIG. 5: F-10).

この停止に応じて、同一マシン上のプロセス管理部31の動作を説明する。   The operation of the process management unit 31 on the same machine in response to this stop will be described.

プロセス管理部31は、処理部32からの停止通知を受信(図7:MA-1)し、現状の処理部32の数を把握し、管理している処理部32の数に満たなければ不足分の処理部の数を起動(図7:MA-3)、この処理部の数の監視と不足分の再起動は、処理部32の停止通知を受信する契機(図7:MA-1)以外にも、定期的に実行される(図7:MA-4、MA-2)。   The process management unit 31 receives a stop notification from the processing unit 32 (FIG. 7: MA-1), grasps the current number of processing units 32, and is insufficient if the number of managed processing units 32 is not reached. The number of processing units is started (FIG. 7: MA-3), and the monitoring of the number of processing units and the restart of the shortage are the triggers for receiving the stop notification of the processing unit 32 (FIG. 7: MA-1). In addition to this, it is periodically executed (Fig. 7: MA-4, MA-2).

これら一連の流れによる処理部32の再起動によって、処理部32内で発生するメモリリークは効率的に解放されることになる。   By restarting the processing unit 32 according to these series of flows, the memory leak occurring in the processing unit 32 is efficiently released.

また、自動的な再起動だけではなく、運用者による再起動通知や、定期的な再起動発行が必要な場合がある。その場合を以下に説明する。   Further, not only automatic restart but also restart notification by an operator or periodic restart issuance may be necessary. Such a case will be described below.

マシン上のプロセス管理部31は、運用者による処理部32の再起動通知を受信(図6:MM-1)すると、管理下の全処理部32について把握し(図6:MM-2)、事前に設定された同時再起動数(図6:D‐3)分の処理部32を選択して、各処理部32に停止を指示する(図6:MM-3)もしくは、プロセスの強制削除を行い、停止分の処理部32を再起動(図6:MM-4)し、再起動後の処理部32からの再起動完了通知を受けて(図6:MM-5)、以上の図6のMM-3〜MM-5の工程を、MM-2で把握した全処理部32において実施することで、処理部32内で発生するメモリリークは解放されることになる。   When the process management unit 31 on the machine receives the restart notification of the processing unit 32 by the operator (FIG. 6: MM-1), it grasps all the processing units 32 under management (FIG. 6: MM-2), Select the processing units 32 for the number of simultaneous restarts set in advance (Fig. 6: D-3) and instruct each processing unit 32 to stop (Fig. 6: MM-3), or forcibly delete processes And restart the processing unit 32 for the stop (FIG. 6: MM-4), and receive a restart completion notification from the processing unit 32 after the restart (FIG. 6: MM-5). By performing the steps 6 to MM-3 to MM-5 in all the processing units 32 grasped by MM-2, the memory leak generated in the processing unit 32 is released.

上述の処理は、プロセス管理部31についてはマシン毎に、また、処理部32については処理部3211〜32mkの全てで並行して実行されるため、処理部32内で発生するメモリリークを解消しながら、同時に、情報源追記クライアント10〜10から入力され続ける処理もいずれかの処理部32にて実行されており、結果として、サービスを停止することなく、サービス中のプロセス群の中の一部プロセス群の再起動を常態化することにより、メモリリークのあるソフトウェアを使って、継続的なサービスを実現することが可能になる。 Since the above-described processing is executed in parallel for each process for the process management unit 31 and for all of the processing units 32 11 to 32 mk for the processing unit 32, a memory leak occurring in the processing unit 32 is prevented. At the same time, the processing that continues to be input from the information source additional recording clients 10 1 to 10 x is also executed by any of the processing units 32. As a result, without stopping the service, By making the restart of some of the processes in the normal state, it becomes possible to realize continuous service using software with memory leak.

なお、サービス2のように映像に適用した場合に処理部32が独立に各画面(フレーム)を処理することで、場合によってはフレームの逆転が生じる場合がある。逆転を補正する必要がある場合には、各処理部32から一度別の結合・整列部プロセスにフレームを送信し、その中で指定時間内データの整列処理を行ってから外部に出力することで対応することになる。   Note that when applied to video as in the service 2, the processing unit 32 processes each screen (frame) independently, so that frame reversal may occur in some cases. When it is necessary to correct the reverse rotation, a frame is transmitted from each processing unit 32 to another joining / aligning unit process once, and after aligning data within a specified time, the data is output to the outside. Will respond.

なお、上記の図3、図8、図9の処理マシンのプロセス管理部31、処理部32の動作をプログラムとして構築し、処理マシンとして利用されるコンピュータにインストールして実行させる、または、ネットワークを介して流通させることが可能である。   The operations of the process management unit 31 and the processing unit 32 of the processing machines shown in FIGS. 3, 8, and 9 are constructed as programs and installed in a computer used as the processing machine for execution, or a network is configured. It is possible to circulate through.

また、構築されたプログラムをハードディスクや、フレキシブルディスク・CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールする、または、配布することが可能である。   Further, the constructed program can be stored in a portable storage medium such as a hard disk, a flexible disk, or a CD-ROM, and can be installed or distributed in a computer.

なお、本発明は、上記の実施の形態及び実施例に限定されることなく、特許請求の範囲内において種々変更・応用が可能である。   The present invention is not limited to the above-described embodiments and examples, and various modifications and applications can be made within the scope of the claims.

本発明では、メモリリークを主に扱ったが、ファイル・ディスクリプタなどプロセス空間の開放によってリセットもしくは解放されるリソースについてもメモリリークと同様に扱うことが可能である。   Although the present invention mainly deals with memory leaks, resources that are reset or released by releasing process space, such as file descriptors, can be handled in the same way as memory leaks.

10 追記クライアント
20 キュー部
30 処理マシン
31 プロセス管理部
32 処理部
10 Additional Client 20 Queue Unit 30 Processing Machine 31 Process Management Unit 32 Processing Unit

Claims (8)

ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理装置であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
前記処理手段群を管理するプロセス管理手段と、を有し、
前記プロセス管理手段は、
運用者からの再起動通知に応じて、または、定期的に、同時再起動数に応じて、同時再起動数分の処理手段を選択して、各処理手段に停止を指示し、そして、停止分の処理手段を再起動させ、該停止分の処理手段からの再起動完了通知を受信する処理を全ての処理手段に対して繰り返す再起動制御手段を有し、
前記処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ、該再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合、及び、前記プロセス管理手段から停止を指示された場合に、当該プロセスを停止する停止制御手段と、
前記プロセス管理手段から再起動が指示された場合に再起動を行い、前記再起動完了通知を該プロセス管理手段に送信する手段と、を有する
ことを特徴とするメモリリーク対応処理装置。
A memory leak handling processing device that provides services while dealing with memory release leaks (hereinafter referred to as memory leaks) due to software quality,
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
Process management means for managing the processing means group,
The process management means includes
Depending on the restart notification from the operator or periodically, according to the number of simultaneous restarts, select the processing means for the number of simultaneous restarts, instruct each processing means to stop, and stop A restart control unit that restarts the processing unit for minutes and repeats the process for receiving the restart completion notification from the processing unit for the stopped amount for all the processing units,
The processing means includes
When one queue management unit is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit, and a process corresponding to the data is executed, a resource leak occurs depending on the process or data. When the value of the restart counter is increased (or decreased) according to the risk, and the value of the restart counter exceeds (or falls below) a preset reference value, and the process management means stops the process. Stop control means for stopping the process when instructed;
A memory leak handling processing apparatus comprising: means for restarting when a restart is instructed from the process management means, and transmitting the restart completion notice to the process management means.
ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理装置であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
前記処理手段群を管理するプロセス管理手段と、を有し、
前記プロセス管理手段は、
実行中の処理手段の数をカウントし、予め設定された管理対象処理手段の数に満たなければ不足分の処理手段を起動させる処理を、該処理手段からの停止通知を受信するまで、または、定期的に繰り返す起動制御手段を有し、
前記処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ、該再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合に、当該プロセスを停止させ、停止通知を前記プロセス管理手段に送信する停止制御手段と、
前記プロセス管理手段から起動が指示されると、プロセスを起動させる手段と、を有する
ことを特徴とするメモリリーク対応処理装置。
A memory leak handling processing device that provides services while dealing with memory release leaks (hereinafter referred to as memory leaks) due to software quality,
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
Process management means for managing the processing means group,
The process management means includes
Counting the number of processing means being executed and starting the insufficient processing means if the number does not satisfy the preset number of management target processing means until a stop notification is received from the processing means, or It has a startup control means that repeats regularly,
The processing means includes
When one queue management unit is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit, and a process corresponding to the data is executed, a resource leak occurs depending on the process or data. Increase (or decrease) the value of the restart counter according to the risk. If the value of the restart counter exceeds (or falls below) a preset reference value, stop the process and notify the stop Stop control means for transmitting to the process management means,
A memory leak handling processing apparatus, comprising: means for starting a process when the process management means is instructed to start;
前記処理手段は、
複数のサービス用の処理モジュールと、
各サービス用モジュールを組み合わせて実行するためのスクリプトの制御手段と、
外部から入力された少なくとも1つ以上のサービスを実現するスクリプトを処理IDと対応させて記憶手段に格納するスクリプト格納手段と、
前記キュー管理手段から取得したデータもしくはデータを取得したキュー管理手段に直接的または間接的に付随する処理IDに基づいて前記記憶手段からスクリプトを取得して実行するスクリプト実行手段と、
を更に有することを特徴とする請求項1または2記載のメモリリーク対応処理装置。
The processing means includes
Processing modules for multiple services;
Script control means for combining and executing each service module;
Script storage means for storing a script for realizing at least one service input from the outside in a storage means in association with a process ID;
Script execution means for acquiring and executing a script from the storage means based on data acquired from the queue management means or a processing ID directly or indirectly associated with the queue management means that acquired the data;
The memory leak handling apparatus according to claim 1, further comprising:
ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理方法であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
前記処理手段群を管理するプロセス管理手段と、を有する装置において、
前記処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ、該再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合に、当該プロセスを停止させ、
プロセス管理手段は、
運用者からの再起動通知に応じて、または、定期的に、同時再起動数に応じて、同時再起動数分の処理手段を選択して、各処理手段に停止を指示し、
プロセス管理手段から停止を指示された処理手段は、
プロセスを停止させ、停止通知を前記プロセス管理手段に送信し、
前記プロセス管理手段は、停止させた処理手段に再起動を指示し、
前記プロセス管理手段から再起動を指示された処理手段は、
プロセスを再起動させて該プロセス管理手段に再起動完了通知を送信する再起動ステップを行う
ことを特徴とするメモリリーク対応処理方法。
A memory leak handling processing method that provides services while dealing with memory release omission due to software quality (hereinafter referred to as memory leak),
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
In an apparatus having process management means for managing the processing means group,
The processing means includes
When one queue management unit is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit, and a process corresponding to the data is executed, a resource leak occurs depending on the process or data. Increase (or decrease) the value of the restart counter according to the risk, and stop the process when the value of the restart counter exceeds (or falls below) a preset reference value,
Process management means
Depending on the restart notification from the operator or periodically, according to the number of simultaneous restarts, select the processing means for the number of simultaneous restarts, instruct each processing means to stop,
The processing means instructed to stop by the process management means is
Stop the process, send a stop notification to the process management means,
The process management means instructs the stopped processing means to restart,
The processing means instructed to restart from the process management means,
A memory leak handling processing method comprising performing a restarting step of restarting a process and transmitting a restart completion notification to the process management means.
ソフトウェアの品質によるメモリの解放漏れ(以下、メモリリーク)に対応しながらサービスを提供するメモリリーク対応処理方法であって、
外部から受け付けたデータをキューイングして管理するキュー管理手段のキューからデータを取得して処理を行う少なくとも2つ以上の処理手段と、
前記処理手段群を管理するプロセス管理手段と、を有する装置において、
前記処理手段は、
任意のアルゴリズムによって1つのキュー管理手段を選択し、該キュー管理手段からデータを少なくとも1件以上取得し、該データに応じた処理を実行する中で、処理もしくはデータに応じてリソースリークが発生するリスクに応じた再起動カウンタの値を増加(もしくは減少)させ、該再起動カウンタの値が事前に設定された基準値を超えた(もしくは下回った)場合に、当該プロセスを停止し、前記プロセス管理手段に停止通知を送信する停止制御ステップを行い、
前記プロセス管理手段は、
前記処理手段から前記停止通知を受信すると共に、実行中の処理手段の数をカウントし、予め設定された管理対象処理手段の数に満たなければ不足分の処理手段を起動させる起動指示を行う起動制御ステップを、該処理手段からの停止通知を受信するまで、または、定期的に行い、
前記処理手段は、
前記プロセス管理手段から起動指示があるとプロセスを起動させ、起動完了通知を該プロセス管理手段に送信する起動ステップを行う
ことを特徴とするメモリリーク対応処理方法。
A memory leak handling processing method that provides services while dealing with memory release omission due to software quality (hereinafter referred to as memory leak),
At least two processing means for obtaining and processing data from a queue of a queue management means for queuing and managing data received from outside;
In an apparatus having process management means for managing the processing means group,
The processing means includes
When one queue management unit is selected by an arbitrary algorithm, at least one piece of data is acquired from the queue management unit, and a process corresponding to the data is executed, a resource leak occurs depending on the process or data. Increase (or decrease) the value of the restart counter according to the risk, and stop the process when the value of the restart counter exceeds (or falls below) a preset reference value, Perform a stop control step to send a stop notification to the management means,
The process management means includes
Start that receives the stop notification from the processing means, counts the number of processing means being executed, and issues a start instruction to start the insufficient processing means if the number of processing target processing means is not set in advance The control step is performed until a stop notification is received from the processing means or periodically,
The processing means includes
A memory leak response processing method, comprising: starting a process when an activation instruction is issued from the process management means; and performing an activation step of transmitting an activation completion notification to the process management means.
前記処理手段は、
外部から入力された少なくとも1つ以上のサービスを実現するスクリプトを処理IDと対応させて記憶手段に格納しておき、
前記キュー管理手段から取得したデータもしくはデータを取得したキュー管理手段に直接的または間接的に付随する処理IDに基づいて前記記憶手段からスクリプトを取得して各サービス用処理モジュールを組み合わせて実行する
ことを特徴とする請求項4または5記載のメモリリーク対応処理方法。
The processing means includes
A script that realizes at least one service input from the outside is stored in the storage means in association with the process ID,
Acquiring a script from the storage unit based on data acquired from the queue management unit or a process ID directly or indirectly associated with the queue management unit that acquired the data, and executing the processing modules for each service in combination 6. The memory leak handling method according to claim 4 or 5, wherein:
請求項1乃至3のいずれか1項に記載のメモリリーク対応装置の各手段としてコンピュータを機能させるためのメモリリーク対応処理プログラム。   A memory leak handling processing program for causing a computer to function as each unit of the memory leak handling apparatus according to claim 1. 請求項7記載のメモリリーク対応処理プログラムを格納したことを特徴とするコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium storing the memory leak handling processing program according to claim 7.
JP2009204921A 2009-09-04 2009-09-04 Memory leak handling method, apparatus and program Expired - Fee Related JP5203321B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009204921A JP5203321B2 (en) 2009-09-04 2009-09-04 Memory leak handling method, apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009204921A JP5203321B2 (en) 2009-09-04 2009-09-04 Memory leak handling method, apparatus and program

Publications (2)

Publication Number Publication Date
JP2011054114A true JP2011054114A (en) 2011-03-17
JP5203321B2 JP5203321B2 (en) 2013-06-05

Family

ID=43943012

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009204921A Expired - Fee Related JP5203321B2 (en) 2009-09-04 2009-09-04 Memory leak handling method, apparatus and program

Country Status (1)

Country Link
JP (1) JP5203321B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018056947A (en) * 2016-09-30 2018-04-05 株式会社東芝 Ip tuner and plural screen generation method
EP4307119A1 (en) 2022-07-11 2024-01-17 Yokogawa Electric Corporation Control device, control system, control method, and control program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001188684A (en) * 1999-11-17 2001-07-10 Internatl Business Mach Corp <Ibm> System and method for selective rejuvenation on transparent time base
JP2001306345A (en) * 2000-04-17 2001-11-02 Toshiba Tec Corp Information processor and pos terminal
JP2006317991A (en) * 2005-05-10 2006-11-24 Hitachi Ltd Method for tuning process number
JP2008117268A (en) * 2006-11-07 2008-05-22 Hitachi High-Tech Control Systems Corp Information management system
JP2009086758A (en) * 2007-09-27 2009-04-23 Bank Of Tokyo-Mitsubishi Ufj Ltd Computer system and system management program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001188684A (en) * 1999-11-17 2001-07-10 Internatl Business Mach Corp <Ibm> System and method for selective rejuvenation on transparent time base
JP2001306345A (en) * 2000-04-17 2001-11-02 Toshiba Tec Corp Information processor and pos terminal
JP2006317991A (en) * 2005-05-10 2006-11-24 Hitachi Ltd Method for tuning process number
JP2008117268A (en) * 2006-11-07 2008-05-22 Hitachi High-Tech Control Systems Corp Information management system
JP2009086758A (en) * 2007-09-27 2009-04-23 Bank Of Tokyo-Mitsubishi Ufj Ltd Computer system and system management program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018056947A (en) * 2016-09-30 2018-04-05 株式会社東芝 Ip tuner and plural screen generation method
EP4307119A1 (en) 2022-07-11 2024-01-17 Yokogawa Electric Corporation Control device, control system, control method, and control program

Also Published As

Publication number Publication date
JP5203321B2 (en) 2013-06-05

Similar Documents

Publication Publication Date Title
CN109714192B (en) Monitoring method and system for monitoring cloud platform
KR101826368B1 (en) Cloud computing monitoring and management system
US8799723B2 (en) Methods and apparatus for event logging in an information network
US9325757B2 (en) Methods and systems for fault-tolerant distributed stream processing
US20160275123A1 (en) Pipeline execution of multiple map-reduce jobs
US8112526B2 (en) Process migration based on service availability in a multi-node environment
US10924538B2 (en) Systems and methods of monitoring software application processes
CN105760240A (en) Distributed task processing method and device
US7925922B2 (en) Failover method and system for a computer system having clustering configuration
CN104598300A (en) Distributive business process customization method and system
US20090319662A1 (en) Process Migration Based on Exception Handling in a Multi-Node Environment
JP5203321B2 (en) Memory leak handling method, apparatus and program
JP2006024187A (en) Communication device, apparatus message processing program and recording medium
JP2011076483A (en) Device and program for managing data
CN110287159B (en) File processing method and device
US8788601B2 (en) Rapid notification system
CN116170325A (en) Task model construction method based on SOAR, electronic equipment and storage medium
CN105760215A (en) Map-reduce model based job running method for distributed file system
JP2010245841A (en) Method and device for managing network, and network apparatus
CN113672452A (en) Method and system for monitoring operation of data acquisition task
JP2000311099A (en) System and method for monitoring process
CN114327838B (en) Video scheduling engine device and method based on distributed management
US20230315604A1 (en) Using a task identifier to identify processing services that have processed a task
CN117593172B (en) Process management method, device, medium and equipment
CN115620191A (en) Video analysis processing method based on distributed tasks and dynamic multi-algorithm

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110705

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121127

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121225

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130213

R150 Certificate of patent or registration of utility model

Ref document number: 5203321

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160222

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees