mysql을 시작할 수 없습니다 - error.log가 지속적으로 작성됩니다.

mysql을 시작할 수 없습니다 - error.log가 지속적으로 작성됩니다.

최근 Ubuntu 서버에 호스팅된 내 사이트에 "데이터베이스 연결 설정 오류"가 표시되기 시작했습니다.

서버에 연결하면 mysql이 지속적으로 다시 시작되는 것처럼 보입니다(3초 전, 20초 전 등 이 명령을 시도할 때마다).

sudo systemctl status mysql.service

 mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (start) since Fri 2023-09-15 14:31:16 UTC; 3s ago
    Process: 8351 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 8362 (mysqld)
     Status: "Server startup in progress"
      Tasks: 12 (limit: 4541)
     Memory: 318.8M
     CGroup: /system.slice/mysql.service
             └─8362 /usr/sbin/mysqld

내 /var/log/mysql/error.log 파일도 빠르게 증가하고 있습니다. 여기에는 이상한 문자와 다음과 같은 텍스트가 많이 포함되어 있습니다.

InnoDB: End of page dump
InnoDB: Page may be a transaction system page
2023-09-15T14:33:15.169775Z 1 [ERROR] [MY-011899] [InnoDB] [FATAL] Unable to read page [page id: space=0, page number=5] into the buffer pool after 100 attempts. The most probable cause of this error may be that the table has been corrupted. Or, the table was compressed with with an algorithm that is not supported by this instance. If it is not a decompress failure, you can try to fix this problem by using innodb_force_recovery. Please see http://dev.mysql.com/doc/refman/8.0/en/ for more details. Aborting...
2023-09-15T14:33:15.169807Z 1 [ERROR] [MY-013183] [InnoDB] Assertion failure: buf0buf.cc:4054:ib::fatal triggered thread 140275780638464
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/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
2023-09-15T14:33:15Z UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=b0a6398207071378976beb42c50ef89be92e92db
Thread pointer: 0x5580f6f1c3f0
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 = 7f9480134be0 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x5580f29d9e71]
/usr/sbin/mysqld(print_fatal_signal(int)+0x39b) [0x5580f184efab]
/usr/sbin/mysqld(my_server_abort()+0x76) [0x5580f184f0f6]
/usr/sbin/mysqld(my_abort()+0xe) [0x5580f29d3e0e]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x349) [0x5580f2c77929]
/usr/sbin/mysqld(ib::fatal::~fatal()+0xd5) [0x5580f2c7a165]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::read_page()+0x1aa) [0x5580f2ce2fba]
/usr/sbin/mysqld(Buf_fetch_normal::get(buf_block_t*&)+0x170) [0x5580f2ceec20]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x59) [0x5580f2ceed09]
/usr/sbin/mysqld(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, Page_fetch, ut::Location, mtr_t*, bool)+0x1fa) [0x5580f2cf02ea]
/usr/sbin/mysqld(Double_write::get(mtr_t*)+0x56) [0x5580f2cf3c56]
/usr/sbin/mysqld(Double_write::init_v1(unsigned int&, unsigned int&)+0x11b) [0x5580f2cf8c1b]
/usr/sbin/mysqld(dblwr::v1::init()+0x1b) [0x5580f2cf8e2b]
/usr/sbin/mysqld(srv_start(bool)+0x1471) [0x5580f2c166a1]
/usr/sbin/mysqld(+0x2349496) [0x5580f2a1d496]
/usr/sbin/mysqld(dd::bootstrap::DDSE_dict_init(THD*, dict_init_mode_t, unsigned int)+0x9e) [0x5580f27564ae]
/usr/sbin/mysqld(dd::upgrade_57::do_pre_checks_and_initialize_dd(THD*)+0x1a9) [0x5580f29abf89]
/usr/sbin/mysqld(+0x1240896) [0x5580f1914896]
/usr/sbin/mysqld(+0x289d0fd) [0x5580f2f710fd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7f94a20cb609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f94a1c9c133]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED

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.

문제는 원래 하드 드라이브가 가득 차서 발생한 것 같습니다. 서버의 오래된 백업을 복원하려고 했지만 가장 오래된 백업에 이미 문제가 있는 것 같습니다.

나는 완전히 막혀서 해결책이 없습니다. 이제 무엇을 시도할 수 있나요?

답변1

my.cnf [mysqld] 섹션에 다음 줄이 필요합니다.

thread_cache_size=64

해당 라인이 섹션에 없으면 [mysqld] 섹션에 추가하십시오.

우리는 도움을 드리기 위해 왔습니다.

관련 정보