Ad Widget

Collapse

Zabbix and MySQL, Crashed tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michaeltje
    Member
    • Aug 2007
    • 44

    #1

    Zabbix and MySQL, Crashed tables

    Hi There,

    My Zabbix box sometimes stops storing the data in the MySQL database, when i check the zabbix_server.log it shows me the follow:

    PHP Code:
      6752:20080214:095201 Query::select min(valuefrom history_uint where clock>1202978881 and itemid=19680
      6752
    :20080214:095201 Query failed:Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6752:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,21450,24264587)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6752:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,20190,1)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6752:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,19860,2)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6752:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,19410,1)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6753:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,20341,1)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6753:20080214:095201 Query::select max(valuefrom history_uint where clock>1202978821 and itemid=20341
      6753
    :20080214:095201 Query failed:Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6753:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,19561,481473)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6753:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,20521,2)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145]
      
    6753:20080214:095201 Query failed: [insert into history_uint (clock,itemid,valuevalues (1202979121,20711,3)] Table './zabbix/history_uint' is marked as crashed and should be repaired [145
    After that i repair the table and the next day it occurs again, is this a bug in zabbix?

    Any help is apreciated since this is quite a serious problem, thanks!
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    No, it is not bug in ZABBIX!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • michaeltje
      Member
      • Aug 2007
      • 44

      #3
      Any idea what this could cause? Its quite annoying

      Comment

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

        #4
        Just a guess, power offs without a proper shutdown?
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • michaeltje
          Member
          • Aug 2007
          • 44

          #5
          The machine is running 24/7 and has not be switched off for like 4/5 months, so thats not the problem

          Comment

          • bbrendon
            Senior Member
            • Sep 2005
            • 870

            #6
            Disk full?
            Unofficial Zabbix Expert
            Blog, Corporate Site

            Comment

            • michaeltje
              Member
              • Aug 2007
              • 44

              #7
              it has used 1 of the 5 GB, i see it happens every morning, it happened today again

              Comment

              • ProTON
                Member
                • Oct 2005
                • 77

                #8
                We are experiencing the same problem too. We've consulted with our MySQL support and they told that this usually happens when using delayed queries. Does Zabbix server/agent uses any of this type of queries?

                Comment

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

                  #9
                  Originally posted by ProTON
                  We are experiencing the same problem too. We've consulted with our MySQL support and they told that this usually happens when using delayed queries. Does Zabbix server/agent uses any of this type of queries?
                  Zabbix does not use delayed queries at all.
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  • ProTON
                    Member
                    • Oct 2005
                    • 77

                    #10
                    So why does it happen? Usually during reboots, normal reboots with shutdown -r now. Also I saw this couple of times on normal working system without any reboots. MySQL tables just crashes randomly.

                    Comment

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

                      #11
                      Originally posted by ProTON
                      So why does it happen? Usually during reboots, normal reboots with shutdown -r now. Also I saw this couple of times on normal working system without any reboots. MySQL tables just crashes randomly.
                      I have no idea. Obviously this question has to be addressed to MySQL team.
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      • stalker
                        Junior Member
                        • Aug 2008
                        • 29

                        #12
                        try to test your hardware! Check your server memory with memtest86.

                        If hardware is ok, recheck mysqld options in mysql.cnf and tune it more accurately.

                        Comment

                        • ProTON
                          Member
                          • Oct 2005
                          • 77

                          #13
                          Memory, CPU and PSU is changed. Also other MySQL DBs on that server works fine without a problem.

                          Comment

                          • bbrendon
                            Senior Member
                            • Sep 2005
                            • 870

                            #14
                            I'll have to agree with Alexei, this isn't Zabbix. Did you fsck? Do you have a mysql wiz around to look at it?
                            Unofficial Zabbix Expert
                            Blog, Corporate Site

                            Comment

                            • ProTON
                              Member
                              • Oct 2005
                              • 77

                              #15
                              I have tried almost everything for the last half a year. Hardware change, fsck, memtest86 and other tests, MySQL version change. Now I tried to swich to InnoDB storage engine instead of MyISAM. If it still crashes then official MySQL support says that this is not a problem with MySQL.

                              Comment

                              Working...