YUKI Hiroshi
yuki****@clear*****
Fri Apr 10 11:38:45 JST 2015
> SIGHUPのときは設定ファイルを再読込するという挙動をするデーモ
> ンが多いので、シャットダウンじゃなくて再読み込み用にとってお
> く(今はデフォルトの挙動のままにしておく)のがいいんじゃない
> かと思いました。
この変更を入れた経緯としては、droonga-http-serverだけが死んでserfのプロ
セスが生き残ってしまう状況が頻発していて、終了処理が行われていない場面が
あるのかな?と思って念のため入れたという感じでした。
とはいえ、実際にログを見た限りでは問題が起こっているのは
service dronoga-http-server (stop|start|restart)
のケースで、結局の所SIGHUPは使われていない状況だったので、このコード自体
は削除してしまっても問題なさそうですね。
Kouhei Sutou wrote:
>> +process.on('SIGHUP', function() {
>> + logger.info('Received a SIGHUP signal. Shutting down the server...');
>> + shutdown();
>> +});
>
> SIGHUPのときは設定ファイルを再読込するという挙動をするデーモ
> ンが多いので、シャットダウンじゃなくて再読み込み用にとってお
> く(今はデフォルトの挙動のままにしておく)のがいいんじゃない
> かと思いました。
>
> In <9919dac6abd53d0a65956db41aad093d7169ab52 �� jenkins.clear-code.com>
> "[Groonga-commit] droonga/droonga-http-server �� 9919dac [master] Do shutdown process for SIGHUP also" on Thu, 09 Apr 2015 16:17:03 +0900,
> YUKI Hiroshi <null+groonga �� clear-code.com> wrote:
>
>> YUKI Hiroshi 2015-04-09 16:17:03 +0900 (Thu, 09 Apr 2015)
>>
>> New Revision: 9919dac6abd53d0a65956db41aad093d7169ab52
>> https://github.com/droonga/droonga-http-server/commit/9919dac6abd53d0a65956db41aad093d7169ab52
>>
>> Message:
>> Do shutdown process for SIGHUP also
>>
>> Modified files:
>> bin/droonga-http-server
>>
>> Modified: bin/droonga-http-server (+5 -0)
>> ===================================================================
>> --- bin/droonga-http-server 2015-04-09 16:16:28 +0900 (a0e3aac)
>> +++ bin/droonga-http-server 2015-04-09 16:17:03 +0900 (e16fb29)
>> @@ -170,6 +170,11 @@ function shutdown(error) {
>> fs.unlinkSync(options.pidFile);
>> }
>>
>> +process.on('SIGHUP', function() {
>> + logger.info('Received a SIGHUP signal. Shutting down the server...');
>> + shutdown();
>> +});
>> +
>> process.on('SIGINT', function() {
>> logger.info('Received a SIGINT signal. Shutting down the server...');
>> shutdown();
>
> _______________________________________________
> Groonga-commit mailing list
> Groonga-commit �� lists.sourceforge.jp
> http://lists.sourceforge.jp/mailman/listinfo/groonga-commit
>
--
結城 洋志 <YUKI Hiroshi>
E-mail: yuki �� clear-code.com
株式会社クリアコード
〒170-0005 東京都豊島区南大塚3-29-9
中野ビル3階
TEL : 03-5927-9440
FAX : 03-5927-9441
WWW : http://www.clear-code.com/