Ad Widget

Collapse

2.2.4rc2 gives memory error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frater
    Senior Member
    • Oct 2010
    • 340

    #1

    2.2.4rc2 gives memory error

    I recently moved my Zabbix to a CentOS 6.5 64-bit server.
    The stable 2.2.3 (from source) is running fine, but I wanted to try the 2.2.4rc2 that was released recently.

    after a:
    Code:
    ./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl --sysconfdir=/etc/zabbix
    make install
    I noticed that Zabbix didn't properly start.
    I noticed the crashing in the log, so I did a "make install" in the 2.2.3 folder and everything was up and running again.

    Why do I suddenly have to change my environment?

    Code:
      3004:20140612:091006.973 Starting Zabbix Server. Zabbix 2.2.4rc2 (revision 46425).
      3004:20140612:091006.973 ****** Enabled features ******
      3004:20140612:091006.973 SNMP monitoring:           YES
      3004:20140612:091006.973 IPMI monitoring:            NO
      3004:20140612:091006.973 WEB monitoring:            YES
      3004:20140612:091006.973 VMware monitoring:          NO
      3004:20140612:091006.973 Jabber notifications:       NO
      3004:20140612:091006.973 Ez Texting notifications:  YES
      3004:20140612:091006.973 ODBC:                       NO
      3004:20140612:091006.973 SSH2 support:               NO
      3004:20140612:091006.973 IPv6 support:               NO
      3004:20140612:091006.973 ******************************
      3004:20140612:091006.973 using configuration file: /etc/zabbix/zabbix_server.conf
      3004:20140612:091006.979 current database version (mandatory/optional): 02020000/02020001
      3004:20140612:091006.979 required mandatory version: 02020000
      3004:20140612:091007.302 __mem_malloc: skipped 0 asked 40 skip_min 4294967295 skip_max 0
      3004:20140612:091007.303 [file:dbconfig.c,line:444] zbx_mem_malloc(): out of memory (requested 40 bytes)
      3004:20140612:091007.303 [file:dbconfig.c,line:444] zbx_mem_malloc(): please increase CacheSize configuration parameter
    
    
      3410:20140612:091103.465 Starting Zabbix Server. Zabbix 2.2.3 (revision 44105).
      3410:20140612:091103.465 ****** Enabled features ******
      3410:20140612:091103.465 SNMP monitoring:           YES
      3410:20140612:091103.465 IPMI monitoring:            NO
      3410:20140612:091103.465 WEB monitoring:            YES
      3410:20140612:091103.465 VMware monitoring:          NO
      3410:20140612:091103.465 Jabber notifications:       NO
      3410:20140612:091103.465 Ez Texting notifications:  YES
      3410:20140612:091103.465 ODBC:                       NO
      3410:20140612:091103.465 SSH2 support:               NO
      3410:20140612:091103.465 IPv6 support:               NO
      3410:20140612:091103.465 ******************************
      3410:20140612:091103.465 using configuration file: /etc/zabbix/zabbix_server.conf
      3410:20140612:091103.476 current database version (mandatory/optional): 02020000/02020001
      3410:20140612:091103.476 required mandatory version: 02020000
      3415:20140612:091103.652 server #1 started [configuration syncer #1]
      3416:20140612:091103.652 server #2 started [db watchdog #1]
      3436:20140612:091103.654 server #14 started [trapper #1]
      3437:20140612:091103.654 server #15 started [trapper #2]
      3439:20140612:091103.654 server #16 started [trapper #3]
      3441:20140612:091103.654 server #17 started [trapper #4]
      3443:20140612:091103.654 server #18 started [trapper #5]
      3447:20140612:091103.655 server #20 started [alerter #1]
      3445:20140612:091103.655 server #19 started [icmp pinger #1]
      3448:20140612:091103.655 server #21 started [housekeeper #1]
      3448:20140612:091103.655 executing housekeeper
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP
  • schranz
    Junior Member
    • Mar 2014
    • 15

    #2
    Hello,

    Have you check the Shared memory from your server ? I have the same probleme and passed the memory to 512 M

    take the link : https://www.zabbix.org/wiki/How_to/c..._shared_memory

    I hope that help you

    Comment

    • frater
      Senior Member
      • Oct 2010
      • 340

      #3
      These are the values:
      Code:
      # ipcs -lm
      
      ------ Shared Memory Limits --------
      max number of segments = 4096
      max seg size (kbytes) = 67108864
      max total shared memory (kbytes) = 17179869184
      min seg size (bytes) = 1
      # sysctl -a | grep -E "shmall|shmmax"
      kernel.shmmax = 68719476736
      kernel.shmall = 4294967296
      It seems as if these values are ample. Or should these be set to lower values?
      As I read it, these are just boundaries and there is enough space to work with.

      BTW... I've seen that other thread, but they are running older versions. I'm only seeing this in 2.2.4
      I just tested rc3 and it's the same.
      I could try it on an Ubuntu server where Zabbix ran for more than a year.
      I'm running Zabbix for more than 5 years on different systems and I never encounterd this. I even ran versions from the trunk for a while.
      Last edited by frater; 18-06-2014, 09:25.
      Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

      Comment

      • frater
        Senior Member
        • Oct 2010
        • 340

        #4
        I wanted to upgrade to 2.2.5rc1 just now and bumped into this again....


        Zabbix 2.2.3 is running fine.
        Why do I suddenly have to modify my environment?
        Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

        Comment

        • schranz
          Junior Member
          • Mar 2014
          • 15

          #5
          I work not with CentOS, have you try to install zabbix with a debian other ubuntu os ?

          Comment

          • frater
            Senior Member
            • Oct 2010
            • 340

            #6
            I've been running it on Ubuntu before.
            Just moved it to this server which is running CentOS (for diversity).
            I don't want to run it on another OS. It's doing more than just Zabbix.
            I would prefer to stay at the current version.

            This is a show-stopper. Why doesn't it get resolved or at least get some feedback from the devs?
            Last edited by frater; 23-09-2014, 05:41.
            Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              hmm, did you see the message which said "please increase CacheSize configuration parameter" ?
              Zabbix 3.0 Network Monitoring book

              Comment

              • frater
                Senior Member
                • Oct 2010
                • 340

                #8
                Originally posted by richlv
                hmm, did you see the message which said "please increase CacheSize configuration parameter" ?
                Yes, but where???

                Can you please be less cryptic?
                Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

                Comment

                • kloczek
                  Senior Member
                  • Jun 2006
                  • 1771

                  #9
                  Originally posted by frater
                  Code:
                    3004:20140612:091007.303 [file:dbconfig.c,line:444] zbx_mem_malloc(): out of memory (requested 40 bytes)
                    3004:20140612:091007.303 [file:dbconfig.c,line:444] zbx_mem_malloc(): please increase CacheSize configuration parameter
                  This is not a bug in zabbix. and error message says exactly what you need to do to
                  Simple you environment is growing and you need increase size of the cache where zabbix server holds configuration data
                  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

                  • frater
                    Senior Member
                    • Oct 2010
                    • 340

                    #10
                    Pfff
                    Was it so hard to write down I had to set that parameter in zabbix_server.conf?
                    There was no placeholder for it in that config nor was its default value high enough to work out of the box.

                    This time I didn't ask but just googled "zabbix CacheSize configuration parameter" and stumbled on this Russian thread.


                    I was unable to read the Russian text but then I knew it was in the config of Zabbix. I've been checking all kinds of OS parameters.

                    Now finally running 2.4.x
                    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

                    Comment

                    • kloczek
                      Senior Member
                      • Jun 2006
                      • 1771

                      #11
                      This not a zabbix server crash.
                      This is normal behavior.

                      All what you need is to do exactly what is in in the logs "please increase CacheSize configuration parameter" and restart server/proxy

                      CacheSize it s size of monitored hosts configurations cache. This cache cannot be increased/reallocated online and to make it easier to maintain this cache is statically allocated on server/proxy start.
                      With growing size of monitored installation you will need time to time increase size of this cache.
                      Internal items allows monitor utilization of this cache. I default zbx server/proxy monitoring template are IIRC items allowing to monitor conf cache and triggers rising alarms recommending rise of CacheSize before zabbix srever/proxy will be not able to keep all host/items configuration in this cache.

                      Please read about zabbix[rcache,<cache>,<mode>] on https://www.zabbix.com/documentation...types/internal
                      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

                      • frater
                        Senior Member
                        • Oct 2010
                        • 340

                        #12
                        Don't tell me now...
                        I now know how to do it and it was indeed a piece of cake.

                        If I searched for this error I was directed to all kind of info that told me to change the environment of my OS. Nowhere was I told to change a parameter in the zabbix_server.conf.

                        There was also no placeholder for this directive in zabbix_server.conf
                        The word "cache" did not exist there.

                        For those that knew what to do it was a few more words to type.
                        It should have been clear to all of you that I was completely looking somewhere else.

                        I've written extensions for zabbix and help out others (check my other posts and contributions in this forum). Don't call me stupid (I'm not implying you did). I still think it wasn't a stupid mistake of mine.
                        Feel free to think otherwise.
                        Last edited by frater; 27-11-2014, 13:29.
                        Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

                        Comment

                        • richlv
                          Senior Member
                          Zabbix Certified Trainer
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Oct 2005
                          • 3112

                          #13
                          Originally posted by frater
                          There was also no placeholder for this directive in zabbix_server.conf
                          The word "cache" did not exist there.
                          you probably have an old config file, possibly from pre-1.8 zabbix. it is strongly suggested to take the config file from the latest version of zabbix and adjust the parameters in there
                          Zabbix 3.0 Network Monitoring book

                          Comment

                          • frater
                            Senior Member
                            • Oct 2010
                            • 340

                            #14
                            Originally posted by richlv
                            you probably have an old config file, possibly from pre-1.8 zabbix. it is strongly suggested to take the config file from the latest version of zabbix and adjust the parameters in there
                            Yes, will do....
                            I've updated many times and that config is quite old, yes.
                            Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

                            Comment

                            Working...