MariaDB/MySQL이 갑자기 충돌하여 다시 시작되지 않습니다.
지난 2주간 제 마리아DB는 주기적으로 고장이 났습니다.다시 시작하면 며칠 동안 문제가 해결되고 다시 문제가 발생합니다.이번 주말에 시간이 더 있을 때 원인을 알아보려고 했는데, 오늘은 고장이 나서 다시 시동이 안 걸려요.단일 Drupal 7 설치로 nginx 서버에서 실행됩니다.
system ctl status mariadb 출력입니다.서비스:
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
Active: failed (Result: exit-code) since Tue 2015-06-09 19:54:28 EDT; 3min 58s ago
Process: 4319 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 4317 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 4289 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 4317 (code=exited, status=0/SUCCESS)
Jun 09 19:54:26 kp mysqld_safe[4317]: 150609 19:54:26 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jun 09 19:54:26 kp mysqld_safe[4317]: 150609 19:54:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jun 09 19:54:27 kp mysqld_safe[4317]: 150609 19:54:27 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Jun 09 19:54:28 kp systemd[1]: mariadb.service: control process exited, code=exited status=1
Jun 09 19:54:28 kp systemd[1]: Failed to start MariaDB database server.
Jun 09 19:54:28 kp systemd[1]: Unit mariadb.service entered failed state.
다음은 mariadb.log의 출력입니다.
150609 20:27:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150609 20:27:56 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
150609 20:27:56 InnoDB: The InnoDB memory heap is disabled
150609 20:27:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150609 20:27:56 InnoDB: Compressed tables use zlib 1.2.7
150609 20:27:56 InnoDB: Using Linux native AIO
150609 20:27:56 InnoDB: Initializing buffer pool, size = 128.0M
150609 20:27:56 InnoDB: Completed initialization of buffer pool
150609 20:27:56 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 30047078369
150609 20:27:56 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 30047078662
150609 20:27:56 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
150609 20:27:56 InnoDB: Waiting for the background threads to start
150609 20:27:56 [ERROR] mysqld got signal 11 ;
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.
To report this bug, see http://kb.askmonty.org/en/reporting-bugs
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.
Server version: 5.5.41-MariaDB-log
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466712 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x0
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 = 0x0 thread_stack 0x48000
/usr/libexec/mysqld(my_print_stacktrace+0x3d)[0x7fdab189479d]
/usr/libexec/mysqld(handle_fatal_signal+0x515)[0x7fdab14aa475]
/lib64/libpthread.so.0(+0xf130)[0x7fdab0bda130]
/usr/libexec/mysqld(+0x64e387)[0x7fdab1659387]
/usr/libexec/mysqld(+0x74ac94)[0x7fdab1755c94]
/usr/libexec/mysqld(+0x73f7d5)[0x7fdab174a7d5]
/usr/libexec/mysqld(+0x64bc99)[0x7fdab1656c99]
/usr/libexec/mysqld(+0x63fc26)[0x7fdab164ac26]
/lib64/libpthread.so.0(+0x7df5)[0x7fdab0bd2df5]
/lib64/libc.so.6(clone+0x6d)[0x7fdaaf4501ad]
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.
150609 20:27:57 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
저는 몇 주 동안 웹사이트에서 아무것도 변경하지 않았는데, 왜 그것이 고장이 났는지, 왜 갑자기 지금 다시 시작되지 않는지 잘 모르겠습니다.저는 모든 것을 검색했고 아이디어가 부족합니다. 위의 로그 중 어떤 것도 도움이 되지 않았습니다.제가 생각할 수 있는 유일한 것은 사이트가 RSS 피드를 정기적으로 크롤링하여 데이터베이스에 기록을 추가한다는 것입니다. 꽤 큰 데이터베이스(몇 달 전에 마지막으로 확인했을 때는 50만 개 이상의 기록)인데, 아마도 지금은 1,000,000개에 가까웠을 것입니다. 그리고 너무 커져서 충돌한 것일까요?저에게 올바른 방향을 알려줄 수 있는 사람은 누구나 매우 감사할 것입니다.
충돌에서 제대로 복구되지 않고 있습니다.my.cnf를 편집하고 nodb 복구를 수행합니다.
더하다innodb_force_recovery = 1;
이 숫자를 1에서 6으로 더 늘릴 수 있습니다. 제공된 링크를 확인하여 차이점이 무엇인지 확인하십시오.
계속 표시되는 경우:InnoDB: Waiting for the background threads to start
오류 로그 파일에 있습니다.
innodb_innodb_delay_delay=0도 추가합니다.
여기 유용한 링크가 있습니다.
그래도 작동하지 않으면 TwinDB/percona_recovery_toolkit을 사용해 보십시오.
언급URL : https://stackoverflow.com/questions/30744951/mariadb-mysql-all-of-a-sudden-crashed-and-wont-restart
'programing' 카테고리의 다른 글
Git 저장소에서 모든 숨겨진 디렉터리/파일을 재귀적으로 무시하는 방법은 무엇입니까? (0) | 2023.09.01 |
---|---|
SQL 데이터베이스 또는 파일에 로그를 저장하는 것이 더 효율적입니까? (0) | 2023.08.27 |
서비스 이름을 사용하여 Django가 Oracle에 연결하도록 강제하는 방법 (0) | 2023.08.27 |
마스터 슬레이브 토폴로지에서 두 데이터 센터를 구성하려면 어떻게 해야 합니까? (0) | 2023.08.27 |
내용 항목을 텍스트 파일로 만드는 스크립트 (0) | 2023.08.27 |