LoginSignup
18
9

More than 5 years have passed since last update.

zabbix-serverプロセスが起動しない場合の対処(cacheメモリ問題)

Posted at

zabbix-serverプロセスをスタートしても落ちる症状
色々と症状はあると思いますが、とある一つのパターン
Cacheメモリサイズ問題編

環境

・Redhat系OS
・zabbix2.4系 rpm版

zabbix serverの起動をしてみる

# /etc/init.d/zabbix-server status
zabbix_server は停止しています
#
# /etc/init.d/zabbix-server start
Starting Zabbix server:                                    [  OK  ]
# /etc/init.d/zabbix-server status
zabbix_server は停止しています

ログを確認してみる

# tail -f /var/log/zabbix/zabbix_server.log
       ↓スタートしたタイミングのログ↓
 47072:20151021:142301.651 Starting Zabbix Server. Zabbix 2.4.1 (revision 49643).
 47072:20151021:142301.651 ****** Enabled features ******
 47072:20151021:142301.651 SNMP monitoring:           YES
 47072:20151021:142301.651 IPMI monitoring:           YES
 47072:20151021:142301.651 WEB monitoring:            YES
 47072:20151021:142301.651 VMware monitoring:         YES
 47072:20151021:142301.651 Jabber notifications:      YES
 47072:20151021:142301.651 Ez Texting notifications:  YES
 47072:20151021:142301.651 ODBC:                      YES
 47072:20151021:142301.651 SSH2 support:              YES
 47072:20151021:142301.651 IPv6 support:              YES
 47072:20151021:142301.651 ******************************
 47072:20151021:142301.651 using configuration file: /etc/zabbix/zabbix_server.conf
 47072:20151021:142301.659 current database version (mandatory/optional): 02040000/02040000
 47072:20151021:142301.659 required mandatory version: 02040000
 47072:20151021:142301.968 __mem_malloc: skipped 2 asked 313832 skip_min 8016 skip_max 123472
 47072:20151021:142301.968 [file:dbconfig.c,line:445] zbx_mem_realloc(): out of memory (requested 313832 bytes)
 47072:20151021:142301.968 [file:dbconfig.c,line:445] zbx_mem_realloc(): please increase CacheSize configuration parameter

ログのメッセージを元に設定を修正

・increase CacheSize configuration parameterってログに出てるので
 zabbix server configurationのcachesizeをチューニングする
 defaultは8M 装着メモリやkernelパラメータのshared memoryで使用できる容量に注意する
 *取り急ぎ起動したかったのでdefaultの倍の値をここでは設定

# diff /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf.2015102101
319d318
< CacheSize=16M
configの該当行
### Option: CacheSize
#       Size of configuration cache, in bytes.
#       Shared memory size for storing host, item and trigger data.
#
# Mandatory: no
# Range: 128K-8G
# Default:
# CacheSize=8M
CacheSize=16M

公式ドキュメントの情報

設定キャッシュのサイズ(バイト単位)。
ホスト、アイテム、トリガーデータを保存するための共有メモリサイズ。
Zabbix 2.2.3より前のバージョンの上限は、2GBでした。

その他

監視項目数などにも左右される部分であり、
初期で含まれているtemplaeの「Template App Zabbix Server」にzabbix serverのCacheSizeを
取得する監視項目が存在するのでその辺りも参考にチューニングすると良さそう。
「Zabbix configuration cache」の部分など。
CacheSizeの設定だけで改善しない場合は、その他historyに関するCache等も調整すると良いと思う

18
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
9