web-dev-qa-db-ja.com

MongoDBをシャットダウンしています。信号15

ライブサーバーでMongoDBを使用する。毎日朝、mongodプロセスがシャットダウンしているのを発見しました。 mongodbログは次のとおりです。

2017-11-02T11:19:49.173+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2017-11-02T11:19:49.174+0000 I NETWORK  [thread1] waiting for connections on port 27017
2017-11-02T11:19:49.469+0000 I NETWORK  [thread1] connection accepted from 127.0.0.1:34826 #1 (1 connection now open)
2017-11-02T11:20:20.112+0000 I NETWORK  [thread1] connection accepted from 127.0.0.1:34828 #2 (2 connections now open)
2017-11-02T11:27:34.728+0000 I CONTROL  [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2017-11-02T11:27:34.728+0000 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
2017-11-02T11:27:34.728+0000 I NETWORK  [signalProcessingThread] closing listening socket: 7
2017-11-02T11:27:34.728+0000 I NETWORK  [signalProcessingThread] closing listening socket: 8
2017-11-02T11:27:34.728+0000 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2017-11-02T11:27:34.728+0000 I NETWORK  [signalProcessingThread] shutdown: going to flush diaglog...
2017-11-02T11:27:34.728+0000 I FTDC     [signalProcessingThread] Shutting down full-time diagnostic data capture
2017-11-02T11:27:34.730+0000 I STORAGE  [signalProcessingThread] WiredTigerKVEngine shutting down
2017-11-02T11:27:34.795+0000 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
2017-11-02T11:27:34.795+0000 I CONTROL  [signalProcessingThread] now exiting
2017-11-02T11:27:34.795+0000 I CONTROL  [initandlisten] shutting down with code:0

私のmongodb構成ファイルは次のとおりです。

# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1


#processManagement:

#security:

#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options:

#auditLog:

#snmp:

オンラインでのソリューションのほとんどは、processManagement.forkをfalseに設定することに関連しています。これはデフォルト値だと思います。

3
Loukit Khemka

Forkがfalseの場合、Shell(mongoを開始した場所)が死ぬとmongoが死ぬ。フォークをtrueに設定します

1
JJussi