• 好久没有处理过故障了


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

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

      但是今天我们的“根基”动摇了;原因是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

    总结

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

    ----

  • 相关阅读:
    Windows netsh命令的使用
    源码安装 qemu-2.0.0 及其依赖 glib-2.12.12
    .ko文件
    Suse环境下编译linux-2.6.24内核
    cut
    POJ3648 Wedding
    [Hnoi2010]Planar
    [中山市选2011]杀人游戏
    BZOJ3033 太鼓达人
    POJ1041 John's trip
  • 原文地址:https://www.cnblogs.com/JiangLe/p/9958517.html
Copyright © 2020-2023  润新知