Ad Widget

Collapse

постоянно падает mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bazik
    Junior Member
    • Sep 2013
    • 5

    #1

    постоянно падает mysql

    Всем привет. Нужен совет. Есть машина, на которой крутится zabbix. 8gb RAM и core2duo 1.8GHz. Два диска по 250 Гб обьеденены в RAID-1.
    Code:
    Количество узлов сети  266
    Количество элементов данных 2682
    Количество триггеров 783
    Требуемое быстродействие сервера, новые значения в секунду	70.58
    Проблема в том, что стабильно раз в сутки падает mysql и ругается на таблицы history, history_text, history_uint. Размер самой большой таблицы history_uint обычно 300-400МБ. Приходится удалять таблицы и восстанавливаться из бэкапа.
    И так каждый день.
    Я в этом деле новичек и с mysql раньше не сталкивался, может нужно что-то в его конфиге дописать?
    Сейчас конфиг имеет такой вид:
    Code:
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    basedir         = /usr
    datadir         = /home/mysql
    tmpdir          =/tmp/mysqltmp/
    #tmpdir         = /tmp
    lc-messages-dir = /usr/share/mysql
    skip-external-locking
    innodb_file_per_table
    innodb_buffer_pool_size = 5000M
    innodb_data_file_path=ibdata1:5000M;ibdata2:3000M:autoextend
    innodb_flush_method=O_DIRECT
    innodb_log_file_size=64M
    tmp_table_size=256M
    max_heap_table_size=256M
    table_cache=512
    innodb_flush_log_at_trx_commit=2 
    join_buffer_size=512k
    read_buffer_size=256k
    read_rnd_buffer_size=256k
    
    bind-address            = 127.0.0.1
    key_buffer              = 256M
    max_allowed_packet      = 2048M
    thread_stack            = 192K
    thread_cache_size       = 4
    myisam-recover         = BACKUP
    max_connections        = 400
    query_cache_limit       = 1M
    query_cache_size        = 64M
    log_error = /var/log/mysql/error.log
    log_slow_queries        = /var/log/mysql/mysql-slow.log
    expire_logs_days        = 10
    max_binlog_size         = 100M
  • ableev
    Senior Member
    Zabbix Certified Specialist
    • Oct 2012
    • 276

    #2
    Что значит "ругается"? Смотрите логи, показывайте их здесь.
    Когда запускается housekeeper?
    Какое в среднем хранение истории выставлено в конфигурации айтемов?
    В принципе,

    innodb_buffer_pool_size = 5000M

    и 8 гб на сервере - могли бы не давать мускулю пережевать всё. Но хостов у вас мало. В общем, показывайте, с какими ошибками падает мускуль.

    Comment

    • bazik
      Junior Member
      • Sep 2013
      • 5

      #3
      В логе примерно каждую секунду валят ошибки о поврежденной таблице.

      Code:
      131112  9:53:56  InnoDB: Page checksum 2265918298, prior-to-4.0.14-form checksum 3979671420
      InnoDB: stored checksum 2029596008, prior-to-4.0.14-form stored checksum 1620126074
      InnoDB: Page lsn 3 1009543270, low 4 bytes of lsn at page end 1009543268
      InnoDB: Page number (if stored to page already) 47198,
      InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 691
      InnoDB: Page may be an index page where index id is 1827
      InnoDB: (index "history_uint_1" of table "zabbix"."history_uint")
      InnoDB: Database page corruption on disk or a failed
      InnoDB: file read of page 47198.
      InnoDB: You may have to recover from a backup.
      InnoDB: It is also possible that your operating
      InnoDB: system has corrupted its own file cache
      InnoDB: and rebooting your computer removes the
      InnoDB: error.
      InnoDB: If the corrupt page is an index page
      InnoDB: you can also try to fix the corruption
      InnoDB: by dumping, dropping, and reimporting
      InnoDB: the corrupt table. You can use CHECK
      InnoDB: TABLE to scan your table for corruption.
      InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
      InnoDB: about forcing recovery.
      InnoDB: Error: Unable to read tablespace 691 page no 47198 into the buffer pool after 100 attempts
      InnoDB: The most probable cause of this error may be that the table has been corrupted.
      InnoDB: You can try to fix this problem by using innodb_force_recovery.
      InnoDB: Please see reference manual for more details.
      InnoDB: Aborting...
      131112  9:53:56  InnoDB: Assertion failure in thread 140423196600064 in file buf0buf.c line 2348
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
      InnoDB: about forcing recovery.
      07:53:56 UTC - mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
      
      key_buffer_size=268435456
      read_buffer_size=262144
      max_used_connections=0
      max_threads=400
      thread_count=0
      connection_count=0
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1188315 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      
      Thread pointer: 0x0
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0 thread_stack 0x30000
      /usr/sbin/mysqld(my_print_stacktrace+0x29)[0x7fb6d5c12349]
      /usr/sbin/mysqld(handle_fatal_signal+0x483)[0x7fb6d5ad7f33]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fb6d4824cb0]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7fb6d3e90425]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7fb6d3e93b8b]
      /usr/sbin/mysqld(+0x642a08)[0x7fb6d5cfea08]
      /usr/sbin/mysqld(+0x62dd61)[0x7fb6d5ce9d61]
      /usr/sbin/mysqld(+0x5ec716)[0x7fb6d5ca8716]
      /usr/sbin/mysqld(+0x6d3bf6)[0x7fb6d5d8fbf6]
      /usr/sbin/mysqld(+0x6d42a6)[0x7fb6d5d902a6]
      /usr/sbin/mysqld(+0x6cfd86)[0x7fb6d5d8bd86]
      /usr/sbin/mysqld(+0x6c5345)[0x7fb6d5d81345]
      /usr/sbin/mysqld(+0x6120cd)[0x7fb6d5cce0cd]
      /usr/sbin/mysqld(+0x6126fe)[0x7fb6d5cce6fe]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7fb6d481ce9a]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fb6d3f4dccd]
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.

      Comment

      • ableev
        Senior Member
        Zabbix Certified Specialist
        • Oct 2012
        • 276

        #4
        Восстанавливать пробовали?

        Comment

        • bazik
          Junior Member
          • Sep 2013
          • 5

          #5
          Восстанавливаю из дампа все таблицы кроме zabbix.history, zabbix.history_uint, zabbix.history_text, zabbix.trends, zabbix.trends_uint.
          Через 2 дня работы максимум опять та же ситуация.

          Comment

          • Jimson
            Senior Member
            • Jan 2008
            • 1327

            #6
            У вас
            стабильно раз в сутки падает mysql
            И при этом пишет
            07:53:56 UTC - mysqld got signal 6 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.
            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.
            Какое слово вы не можете перевести и при чем тут Zabbix?

            Comment

            • bazik
              Junior Member
              • Sep 2013
              • 5

              #7
              Перевести я могу, но ничего конкретного я не вижу в этом сообщении.
              А zabbix при том, что все началось после его установки. На этом же сервере крутяться и другие базы, которые ни разу не падали более чем за 6 месяцев.

              Comment

              • Jimson
                Senior Member
                • Jan 2008
                • 1327

                #8
                "вчера работало, сегодня не работает, где лечить?"
                У вас процесс mysqld грохается по SIGABRT и дропает кору, ну при чем тут установка забикса, другие базы и то что было вчера?

                Comment

                • bazik
                  Junior Member
                  • Sep 2013
                  • 5

                  #9
                  Я еще в первом посте написал, что я в работе с mysql новичек, потому и попросил совета у более опытных пользователей. Проблемы начались после установки заббикса, потому и предположил что проблема с ним.
                  Если Вы можете подсказать как исправить проблему, буду очень благодарен.

                  Comment

                  • Jimson
                    Senior Member
                    • Jan 2008
                    • 1327

                    #10
                    Очевидно что надо менять или железо или дистрибутив или mysql пересобирать.

                    Comment

                    • yukra
                      Senior Member
                      • Apr 2013
                      • 1359

                      #11
                      Може оом? Или какой то хитрый скрипт мониторищий нагрузку?

                      Comment

                      Working...