Ad Widget

Collapse

1.4 Out of Memory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PeterN
    Junior Member
    • Feb 2007
    • 24

    #1

    1.4 Out of Memory

    11615:20070601:084219 Host [10.5.10.2]: first network error, wait for 15 seconds
    11650:20070601:084219 zbx_malloc: out of memory. requested '3213038697' bytes.
    11607:20070601:084219 One child process died. Exiting ...
    11607:20070601:084221 ZABBIX Server stopped
    --------------------------------------------------------------------------
    Seems to be related to discovery.
    I appeard after I applied second patch from:
    Last edited by PeterN; 01-06-2007, 11:03.
  • PeterN
    Junior Member
    • Feb 2007
    • 24

    #2
    I can confirm it is discovery related.
    No problems with discovery disabled.

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Can you post your discovery rules?
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • remi
        Junior Member
        • Sep 2006
        • 11

        #4
        Hi Alexei,

        I have the same problem, but I have no patch applied. I'm using the default discovery rules for linux (they are automatically added during install). I just enabled them and I also changed the default 192.168.1.x to 192.168.0.x. That's all.

        I downloaded the latest 1.4 version from your site yesterday. Please let me know what more info is helpful to you.

        thanks,remi

        Comment

        • kotique
          Junior Member
          • Jun 2007
          • 1

          #5
          Hi.

          The same problem here. I'm using default discovery rules with modified IP range.

          Here is a part of my zabbix_server log:

          Code:
          16327:20070618:234109 19250
           16327:20070618:234109 Query [insert into items (itemid,description,key_,hostid,delay,history,nextcheck,status,type,snmp_community,snmp_oid,value_type,trapper_hosts,
          snmp_port,units,multiplier,delta,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authpassphrase,snmpv3_privpassphrase,formula,trends,logtimefmt,valuemapid,delay_flex
          ,templateid) values (19250,'Total memory','vm.memory.size[total]',10024,1800,7,0, 0,0,'','',3,'',161,'B',0,0,'',0,'','','0',365,'',0, '',10026)]
           16327:20070618:234109 In DBget_maxid(items_applications,itemappid)
           16327:20070618:234109 Query [select nextid from ids where nodeid=0 and table_name='items_applications' and field_name='itemappid']
           16327:20070618:234109 Query [update ids set nextid=nextid+1 where nodeid=0 and table_name='items_applications' and field_name='itemappid']
           16327:20070618:234109 Query [select nextid from ids where nodeid=0 and table_name='items_applications' and field_name='itemappid']
           16327:20070618:234109 3642
           16327:20070618:234109 Query [insert into items_applications (itemappid,itemid,applicationid)  values(3642,19250,233)]
           16327:20070618:234109 In DBget_maxid(items_applications,itemappid)
           16327:20070618:234109 Query [select nextid from ids where nodeid=0 and table_name='items_applications' and field_name='itemappid']
           16327:20070618:234109 Query [update ids set nextid=nextid+1 where nodeid=0 and table_name='items_applications' and field_name='itemappid']
           16327:20070618:234109 Query [select nextid from ids where nodeid=0 and table_name='items_applications' and field_name='itemappid']
           16327:20070618:234109 3643
           16327:20070618:234109 Query [insert into items_applications (itemappid,itemid,applicationid)  values(3643,19250,227)]
           16327:20070618:234109 Query [select hostid from hosts_templates where templateid=10024]
           16327:20070618:234109 Added new item '11.0.3.11:vm.memory.size[total]'
           16327:20070618:234109 Query [select distinct t.triggerid from triggers t, functions f, items i where i.hostid=10001 and f.itemid=i.itemid and f.triggerid=t.triggeri
          d]
           16327:20070618:234109 Query [select description,priority,status,comments,url,expression from triggers where triggerid=10045]
           16327:20070618:234109 Query [select triggerid_up from trigger_depends where triggerid_down=10045]
           16327:20070618:234109 Query [select distinct t.triggerid,t.templateid from functions f,items i,triggers t  where t.templateid=0 and t.triggerid=f.triggerid and i.it
          emid=f.itemid and i.hostid=10024]
           16327:20070618:234109 In DBget_maxid(triggers,triggerid)
           16327:20070618:234109 Query [select nextid from ids where nodeid=0 and table_name='triggers' and field_name='triggerid']
           16327:20070618:234109 Query [update ids set nextid=nextid+1 where nodeid=0 and table_name='triggers' and field_name='triggerid']
           16327:20070618:234109 Query [select nextid from ids where nodeid=0 and table_name='triggers' and field_name='triggerid']
           16327:20070618:234109 12818
           16327:20070618:234109 zbx_malloc: out of memory. requested '3215462045' bytes.
          And here you can get the output of "strace -fx /usr/bin/zabbix_server -c /etc/zabbix/zabbix_server.conf"

          I've tried to debug it using gdb, but didn't have any luck with it...
          Last edited by kotique; 18-06-2007, 23:01.

          Comment

          • joluinfante
            Junior Member
            • Jun 2007
            • 18

            #6
            zbx_malloc: out of memory. requested '3221201621' bytes.

            Any idea about this problem?
            The problem appear after insert the data in hosts table, in a autodiscovery.

            Comment

            • joluinfante
              Junior Member
              • Jun 2007
              • 18

              #7
              The solution!

              Hi, forum!

              The problem:
              ------------
              24267:20070630:194324 (DBdyn_escape_string=(Version of zabbix_agent(d) was changed on {HOSTNAME})
              24267:20070630:194324 In zbx_malloc(size:135293325) <--- A lot of memory!
              24267:20070630:194324 (DBdyn_escape_string=()
              24267:20070630:194324 In zbx_malloc(size:135293273)
              24267:20070630:194324 (DBdyn_escape_string=()
              24267:20070630:194324 In zbx_malloc(size:1212289033)
              24267:20070630:194324 In zbx_malloc(size:1024)
              24267:20070630:194324 In zbx_malloc(size:1024)
              24267:20070630:194324 (DBdyn_escape_string=(diff)
              24267:20070630:194324 In zbx_malloc(size:-1073769003)
              24267:20070630:194324 zbx_malloc: out of memory. requested '3221198293' bytes.
              24245:20070630:194324 One child process died. Exiting ...
              24245:20070630:194326 ZABBIX Server stopped


              The solution:
              -------------
              vi ./src/libs/zbxdbhigh/db.c
              ----------------------------
              char* DBdyn_escape_string(const char *str)
              { /* NOTE: sync changes with 'DBescape_string' */
              register int i;

              char *str_esc = NULL;

              // int str_esc_len; <---- The problem is here
              int str_esc_len=0;

              Comment

              • bbrendon
                Senior Member
                • Sep 2005
                • 870

                #8
                Is this also in 1.4.1??
                Unofficial Zabbix Expert
                Blog, Corporate Site

                Comment

                • joluinfante
                  Junior Member
                  • Jun 2007
                  • 18

                  #9
                  I'm using the last free version (I suppouse), downloaded from cvs, and I did compile it.
                  I'm a newer on use of this product.
                  I'm learning...

                  ./zabbix_server --version
                  ZABBIX Server (daemon) v1.4 (29 May 2007)
                  Compilation time: Jun 30 2007 19:38:05

                  Do you have a new version?
                  Where I can download it?

                  Comment

                  • joluinfante
                    Junior Member
                    • Jun 2007
                    • 18

                    #10
                    The bug is corrected in 1.4.1.

                    Comment

                    • vikty
                      Senior Member
                      • Jul 2007
                      • 104

                      #11
                      Hi, forum

                      How I use Zabbix 1.4 and I have the same problem
                      24204:20071016:114414 zbx_malloc: out of memory. requested '18446744073148864993' bytes.
                      Whene I increase "StartHTTPPollers=1" parameter

                      Can I resolve the problem with an upgrade or changeing "./src/libs/zbxdbhigh/db.c"?
                      Last edited by vikty; 17-10-2007, 16:40.

                      Comment

                      • Alexei
                        Founder, CEO
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Sep 2004
                        • 5654

                        #12
                        Originally posted by vikty
                        Hi, forum

                        How I use Zabbix 1.4 and I have the same problem

                        Whene I increase "StartHTTPPollers=1" parameter

                        Can I resolve the problem with an upgrade or changeing "./src/libs/zbxdbhigh/db.c"?
                        I would recommend to upgrade to 1.4.2.
                        Alexei Vladishev
                        Creator of Zabbix, Product manager
                        New York | Tokyo | Riga
                        My Twitter

                        Comment

                        • vikty
                          Senior Member
                          • Jul 2007
                          • 104

                          #13
                          ok,
                          Now I am testing the zabbix 1.4.2 in my PC

                          Comment

                          Working...