Ad Widget

Collapse

ZAbbix server stop zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Xyue
    Member
    • Jan 2016
    • 93

    #1

    ZAbbix server stop zabbix

    Hi guys,

    My Zabbix server suddenly not working. I have check the server log and it shows below error message.

    5092:20160518:160122.579 __mem_malloc: skipped 0 asked 48 skip_min 4294967295 skip_max 0
    5092:20160518:160122.579 [file:strpool.c,line:53] zbx_mem_malloc(): out of memory (requested 45 bytes)
    5092:20160518:160122.579 [file:strpool.c,line:53] zbx_mem_malloc(): please increase CacheSize configuration parameter
    5090:20160518:160122.581 One child process died (PID:5092,exitcode/signal:1). Exiting ...
    5090:20160518:160124.582 syncing history data...
    5090:20160518:160124.733 syncing history data done
    5090:20160518:160124.733 syncing trends data...
    5090:20160518:160133.200 syncing trends data done
    5090:20160518:160133.201 Zabbix Server stopped. Zabbix 3.0.1 (revision 58734).

    It seems like memory issue and cause zabbix crash

    Below is the details for the memory
    [root@zabsrv ~]# free -m -h
    total used free shared buffers cached
    Mem: 15G 15G 462M 4.9M 189M 12G
    -/+ buffers/cache: 2.5G 13G
    Swap: 7.9G 16M 7.8G


    Can anyone advise me how to solve this and if this is really memory issue, how to allocate more memory for this ?

    Thank you very much .
    Last edited by Xyue; 18-05-2016, 10:17.
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    In logs you have very clear message what needs to be done:
    "please increase CacheSize configuration parameter"
    Number of monitored metrics by your zabbix server is growing so you need to increase configuration cache size.
    Other case scenario is that even if number of monitored metrics is almost the same you have some number of unmonitored hosts and as long as escalation processmay operate even on hosts with disabled monitoring configuration of these hosts needs to be held in config cache. In such case you must make decision about remove these hosts or increase cache.

    You should start as well monitoring of your zabbix server using dist zabbi server template. Such monitoring will produce in advance alarms that some caches needs to be increased.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Xyue
      Member
      • Jan 2016
      • 93

      #3
      Hi kloczek,

      Noted and I have check zabbix website and found below link to increase cache size.
      Join the friendly and open Zabbix community on our forums and social media platforms.


      Is this the way to increase the memory ?

      [root@zabsrv ~]# sysctl -a | grep -E "shmall|shmmax"
      kernel.shmmax = 68719476736
      kernel.shmall = 4294967296



      *Apologies as i am new on linux.

      Thank you very much on your advise.
      Last edited by Xyue; 18-05-2016, 10:48.

      Comment

      • DmitryL
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2016
        • 278

        #4
        Hello Xyue!

        Looks like you need to edit zabbix configuration file
        /etc/zabbix/zabbix_server.conf


        Code:
        ### Option: CacheSize
        #       Size of configuration cache, in bytes.
        #       Shared memory size for storing host, item and trigger data.
        #
        # Mandatory: no
        # Range: 128K-8G
        # Default:
        [B]# CacheSize=8M[/B]

        Comment

        • Xyue
          Member
          • Jan 2016
          • 93

          #5
          Hi Dmitryb,

          I have update the zabbix server conf file cache size = 32M

          However i was not able to restart the zabbix server and hence the new config was unable to read.

          [root@zabsrv ~]# sudo service zabbix-server restart
          Shutting down Zabbix server: [FAILED]
          Starting Zabbix server: [ OK ]

          Any advise ?

          Thank you very much in advance.

          Comment

          • Xyue
            Member
            • Jan 2016
            • 93

            #6
            Hi all,

            After update the cache size in the server config file, It was OK now. I don't need to restart it.

            Thank you very much for Dmitryb and kloczek for helping and replying so fast.

            Comment

            • Xyue
              Member
              • Jan 2016
              • 93

              #7
              Hi guys,

              Any idea what is the recommended value for the below cache size.
              • cache size
              • history cache size
              • trend cache size
              • value cache size


              I was having some memory issue on yesterday and has increase the cache size in zabbix server config file from default to 32M. So far I only added less than 10 devices in Zabbix.

              Just in case it happen again, if my purpose was to add like around 100 devices, what is the recommended cache size ?

              Thank you very much in advance.

              Comment

              • DmitryL
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • May 2016
                • 278

                #8
                Hi again!

                Take a look at this topic

                Comment

                • Xyue
                  Member
                  • Jan 2016
                  • 93

                  #9
                  Hi Dmitryb,

                  Thanks again for the link. I think I will monitor the server as well with the distribute zabbix server template.

                  Thank you very much and appreciate the help on this.

                  Comment

                  Working...