启动zabbix_server服务失败:__zbx_mem_realloc(): out of memory (requested 366104 bytes)

田彬郁
2023-12-01

目录

一、缓存原因导致zabbix_server无法启动

(一)详细日志

(二)看日志查找原因

(三)解决方案


一、缓存原因导致zabbix_server无法启动

(一)详细日志

  6485:20220610:162901.568 Starting Zabbix Server. Zabbix 6.0.4 (revision 3d787ff402e).

  6485:20220610:162901.568 ****** Enabled features ******

  6485:20220610:162901.568 SNMP monitoring:           YES

  6485:20220610:162901.568 IPMI monitoring:            NO

  6485:20220610:162901.568 Web monitoring:            YES

  6485:20220610:162901.568 VMware monitoring:         YES

  6485:20220610:162901.568 SMTP authentication:       YES

  6485:20220610:162901.568 ODBC:                       NO

  6485:20220610:162901.568 SSH support:                NO

  6485:20220610:162901.568 IPv6 support:              YES

  6485:20220610:162901.568 TLS support:               YES

  6485:20220610:162901.568 ******************************

  6485:20220610:162901.568 using configuration file: /usr/local/etc/zabbix_server.conf

  6485:20220610:162901.594 current database version (mandatory/optional): 06000000/06000000

  6485:20220610:162901.594 required mandatory version: 06000000

  6486:20220610:162901.605 starting HA manager

  6486:20220610:162901.621 HA manager started in active mode

  6485:20220610:162901.622 server #0 started [main process]

  6487:20220610:162901.623 server #1 started [service manager #1]

  6488:20220610:162901.624 server #2 started [configuration syncer #1]

  6488:20220610:162902.744 __mem_malloc: skipped 11 asked 366104 skip_min 256 skip_max 298360

  6488:20220610:162902.744 [file:dbconfig.c,line:89] __zbx_mem_realloc(): out of memory (requested 366104 bytes)

  6488:20220610:162902.744 [file:dbconfig.c,line:89] __zbx_mem_realloc(): please increase CacheSize configuration parameter

  6488:20220610:162902.744 === memory statistics for configuration cache ===

  6488:20220610:162902.744 free chunks of size     24 bytes:       90

  6488:20220610:162902.744 free chunks of size >= 256 bytes:       11

  6488:20220610:162902.744 min chunk size:         24 bytes

  6488:20220610:162902.744 max chunk size:     298360 bytes

  6488:20220610:162902.745 memory of total size 29296400 bytes fragmented into 266104 chunks

  6488:20220610:162902.745 of those,     422368 bytes are in      101 free chunks

  6488:20220610:162902.745 of those,   28874032 bytes are in   266003 used chunks

  6488:20220610:162902.745 of those,    4257648 bytes are used by allocation overhead

  6488:20220610:162902.745 ================================

  6488:20220610:162902.745 === Backtrace: ===

  6488:20220610:162902.746 13: zabbix_server: configuration syncer [syncing configuration](zbx_backtrace+0x44) [0x58af34]

  6488:20220610:162902.746 12: zabbix_server: configuration syncer [syncing configuration](__zbx_mem_realloc+0x228) [0x587998]

  6488:20220610:162902.746 11: zabbix_server: configuration syncer [syncing configuration](zbx_hashset_reserve+0x9c) [0x58f48c]

  6488:20220610:162902.746 10: zabbix_server: configuration syncer [syncing configuration](zbx_hashset_insert_ext+0x98) [0x58f5e8]

  6488:20220610:162902.746 9: zabbix_server: configuration syncer [syncing configuration](DCfind_id+0x74) [0x53e694]

  6488:20220610:162902.746 8: zabbix_server: configuration syncer [syncing configuration](DCsync_configuration+0x2df8) [0x543db8]

  6488:20220610:162902.746 7: zabbix_server: configuration syncer [syncing configuration](dbconfig_thread+0xec) [0x45cecc]

  6488:20220610:162902.746 6: zabbix_server: configuration syncer [syncing configuration](zbx_thread_start+0x34) [0x5965dc]

  6488:20220610:162902.746 5: zabbix_server: configuration syncer [syncing configuration]() [0x4513d0]

  6488:20220610:162902.746 4: zabbix_server: configuration syncer [syncing configuration](MAIN_ZABBIX_ENTRY+0x9e4) [0x45246c]

  6488:20220610:162902.746 3: zabbix_server: configuration syncer [syncing configuration](daemon_start+0x1fc) [0x58ace4]

  6488:20220610:162902.746 2: zabbix_server: configuration syncer [syncing configuration](main+0x44c) [0x44a01c]

  6488:20220610:162902.746 1: /lib64/libc.so.6(__libc_start_main+0xe0) [0xfffe62a53fe0]

  6488:20220610:162902.746 0: zabbix_server: configuration syncer [syncing configuration]() [0x450700]

  6485:20220610:162902.748 One child process died (PID:6488,exitcode/signal:1). Exiting ...

  6486:20220610:162902.748 HA manager has been paused

  6486:20220610:162902.778 HA manager has been stopped

  6485:20220610:162902.780 Zabbix Server stopped. Zabbix 6.0.4 (revision 3d787ff402e).

(二)看日志查找原因

关键报错:

[file:dbconfig.c,line:89] __zbx_mem_realloc(): out of memory (requested 366104 bytes)

  6488:20220610:162902.744 [file:dbconfig.c,line:89] __zbx_mem_realloc(): please increase CacheSize configuration parameter

可以看出是缓存的原因,out of memory(requested 366104 bytes)

(三)解决方案

增加zabbix_server的缓存,please increase CacheSize configuration parameter

增加方法:

vim /usr/local/etc/zabbix_server.conf
#打开注释,增加到64M
CacheSize=64M
 类似资料: