好久没有处理过故障了

平静的日子总是那么的平凡

  好久,没处理过故障了。没想到今天给我来一个,目前我们的数据库都有比较成熟的配套监控,绝大多数的问题可以解决在“胚胎”阶段

  但是今天我们的“根基”动摇了;原因是zabbix_server这位老将倒下了

 

第一步:查看zabbix_server的日志

  第一步想到的就是看一下zabbix_server日志,看一下是什么原因“带走”了我们的沙场老兵

185323:20181114:103512.546 using configuration file: /usr/local/zabbix-4.0.0/etc/zabbix_server.conf
185323:20181114:103512.548 current database version (mandatory/optional): 04000000/04000000
185323:20181114:103512.548 required mandatory version: 04000000
185323:20181114:103512.753 __mem_malloc: skipped 0 asked 24 skip_min 18446744073709551615 skip_max 0
185323:20181114:103512.753 [file:dbconfig.c,line:94] zbx_mem_realloc(): out of memory (requested 16 bytes)
185323:20181114:103512.753 [file:dbconfig.c,line:94] zbx_mem_realloc(): please increase CacheSize configuration parameter
185393:20181114:103522.789 Starting Zabbix Server. Zabbix 4.0.0 (revision 85308).
185393:20181114:103522.795 ****** Enabled features ******
185393:20181114:103522.795 SNMP monitoring:           YES
185393:20181114:103522.795 IPMI monitoring:            NO
185393:20181114:103522.795 Web monitoring:            YES
185393:20181114:103522.795 VMware monitoring:         YES
185393:20181114:103522.795 SMTP authentication:       YES
185393:20181114:103522.795 Jabber notifications:       NO
185393:20181114:103522.795 Ez Texting notifications:  YES
185393:20181114:103522.795 ODBC:                      YES
185393:20181114:103522.795 SSH2 support:               NO
185393:20181114:103522.795 IPv6 support:               NO
185393:20181114:103522.795 TLS support:                NO
185393:20181114:103522.795 ******************************

  上面的内容可以清楚的看到分配给zabbix_server的CacheSize内存用完了,于是zabbix_server就倒了;日志里面也有非常明显的提示把这个参数

  的值调大一点就行了

 

第二步:解决问题

  上一步已经知道问题的解决方案了,那么剩下的就是实施了;由于我们主机性能上比较牛逼,所以我这里直接把CacheSize放大到最大值,是“富裕”

  让我如此大手大脚,在配置文件中直接把CacheSize放大到最大值8G(有的是内存!)

### 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=8G

 

 

第三步:重启zabbix_server

  到这里也就没有什么了,重启zabbix_server就行了

systemctl start zabbix_server

 

 

总结

  公司大到一定程度硬件资源就显得尤为重要了

 

 

 

----

posted on 2018-11-14 16:14  蒋乐兴的技术随笔  阅读(871)  评论(0编辑  收藏  举报

导航