MariaDB가 충돌하는 이유를 찾는 방법은 무엇입니까?
저는 넥스트클라우드(현재 18개)를 사용합니다.웹 브라우저를 통해 클라우드에 액세스할 때 이 메시지가 표시되기 전까지는 모든 것이 정상적으로 작동했습니다.
내부 서버 오류 서버에서 내부 오류가 발생하여 요청을 완료할 수 없습니다.이 오류가 여러 번 다시 나타나면 서버 관리자에게 문의하십시오. 보고서에 아래의 기술 세부 정보를 포함하십시오.자세한 내용은 서버 로그에서 확인할 수 있습니다.
저는 도커를 사용하고 있습니다. 즉, 더 구체적인 도커 컴포지트를 거의 2년 동안 사용하고 있습니다. fpm alpine은 mariadb, redis, app, web, cron의 5가지 부분으로 나뉩니다.
version: '3'
services:
nextcloud_db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- nextcloud_db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
env_file:
- db.env
nextcloud_redis:
image: redis:alpine
restart: always
nextcloud_app:
build: ./app
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=nextcloud_db
- REDIS_HOST=nextcloud_redis
env_file:
- db.env
depends_on:
- nextcloud_db
- nextcloud_redis
nextcloud_web:
build: ./web
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- nextcloud:/var/www/html:ro
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
depends_on:
- nextcloud_app
nextcloud_cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- nextcloud_db
- nextcloud_redis
volumes:
nextcloud_db:
nextcloud:
현재 Mariadbone에 오류가 있습니다.
nextcloud_db_1 | 2020-05-15 01:28:44+02:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.13+maria~bionic started.
nextcloud_db_1 | 2020-05-15 01:28:49+02:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
nextcloud_db_1 | 2020-05-15 01:28:49+02:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.13+maria~bionic started.
nextcloud_db_1 | 2020-05-15 1:28:50 0 [Note] mysqld (mysqld 10.4.13-MariaDB-1:10.4.13+maria~bionic) starting as process 1 ...
nextcloud_db_1 | 2020-05-15 1:28:50 0 [Warning] You need to use --log-bin to make --binlog-format work.
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Using Linux native AIO
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Uses event mutexes
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Number of pools: 1
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Using SSE2 crc32 instructions
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
nextcloud_db_1 | 2020-05-15 1:28:51 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=8312011756
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: Waiting for purge to start
nextcloud_db_1 | 2020-05-15 01:28:52 0x7f010affd700 InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.4.13/storage/innobase/include/fut0lst.ic line 67
nextcloud_db_1 | InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
nextcloud_db_1 | InnoDB: We intentionally generate a memory trap.
nextcloud_db_1 | InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
nextcloud_db_1 | InnoDB: If you get repeated assertion failures or crashes, even
nextcloud_db_1 | InnoDB: immediately after the mysqld startup, there may be
nextcloud_db_1 | InnoDB: corruption in the InnoDB tablespace. Please refer to
nextcloud_db_1 | InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
nextcloud_db_1 | InnoDB: about forcing recovery.
nextcloud_db_1 | 200515 1:28:52 [ERROR] mysqld got signal 6 ;
nextcloud_db_1 | This could be because you hit a bug. It is also possible that this binary
nextcloud_db_1 | or one of the libraries it was linked against is corrupt, improperly built,
nextcloud_db_1 | or misconfigured. This error can also be caused by malfunctioning hardware.
nextcloud_db_1 |
nextcloud_db_1 | To report this bug, see https://mariadb.com/kb/en/reporting-bugs
nextcloud_db_1 |
nextcloud_db_1 | We will try our best to scrape up some info that will hopefully help
nextcloud_db_1 | diagnose the problem, but since we have already crashed,
nextcloud_db_1 | something is definitely wrong and this may fail.
nextcloud_db_1 |
nextcloud_db_1 | Server version: 10.4.13-MariaDB-1:10.4.13+maria~bionic
nextcloud_db_1 | key_buffer_size=134217728
nextcloud_db_1 | read_buffer_size=2097152
nextcloud_db_1 | max_used_connections=0
nextcloud_db_1 | max_threads=102
nextcloud_db_1 | thread_count=4
nextcloud_db_1 | It is possible that mysqld could use up to
nextcloud_db_1 | key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 760255 K bytes of memory
nextcloud_db_1 | Hope that's ok; if not, decrease some variables in the equation.
nextcloud_db_1 |
nextcloud_db_1 | Thread pointer: 0x7f00fc000c08
nextcloud_db_1 | Attempting backtrace. You can use the following information to find out
nextcloud_db_1 | where mysqld died. If you see no messages after this, something went
nextcloud_db_1 | terribly wrong...
nextcloud_db_1 | stack_bottom = 0x7f010affcc08 thread_stack 0x49000
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: 10.4.13 started; log sequence number 8312011765; transaction id 20582626
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: !!! innodb_force_recovery is set to 1 !!!
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
nextcloud_db_1 | 2020-05-15 1:28:52 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloud_db_1 | mysqld(my_print_stacktrace+0x2e)[0x561046981e8e]
nextcloud_db_1 | mysqld(handle_fatal_signal+0x515)[0x5610463fd915]
nextcloud_db_1 | /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f0148c84890]
nextcloud_db_1 | /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f01475b8e97]
nextcloud_db_1 | /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f01475ba801]
nextcloud_db_1 | mysqld(+0x57c53c)[0x56104610a53c]
nextcloud_db_1 | mysqld(+0xb35506)[0x5610466c3506]
nextcloud_db_1 | mysqld(+0xb35d5d)[0x5610466c3d5d]
nextcloud_db_1 | mysqld(+0xb39a55)[0x5610466c7a55]
nextcloud_db_1 | mysqld(+0xb1c16e)[0x5610466aa16e]
nextcloud_db_1 | /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f0148c796db]
nextcloud_db_1 | /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f014769b88f]
nextcloud_db_1 |
nextcloud_db_1 | Trying to get some variables.
nextcloud_db_1 | Some pointers may be invalid and cause the dump to abort.
nextcloud_db_1 | Query (0x0):
nextcloud_db_1 | Connection ID (thread ID): 2
nextcloud_db_1 | Status: NOT_KILLED
nextcloud_db_1 |
nextcloud_db_1 | Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
nextcloud_db_1 |
nextcloud_db_1 | The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
nextcloud_db_1 | information that should help you find out what is causing the crash.
nextcloud_db_1 | Writing a core file...
nextcloud_db_1 | Working directory at /var/lib/mysql
nextcloud_db_1 | Resource Limits:
nextcloud_db_1 | Limit Soft Limit Hard Limit Units
nextcloud_db_1 | Max cpu time unlimited unlimited seconds
nextcloud_db_1 | Max file size unlimited unlimited bytes
nextcloud_db_1 | Max data size unlimited unlimited bytes
nextcloud_db_1 | Max stack size 8388608 unlimited bytes
nextcloud_db_1 | Max core file size unlimited unlimited bytes
nextcloud_db_1 | Max resident set unlimited unlimited bytes
nextcloud_db_1 | Max processes unlimited unlimited processes
nextcloud_db_1 | Max open files 1048576 1048576 files
nextcloud_db_1 | Max locked memory 16777216 16777216 bytes
nextcloud_db_1 | Max address space unlimited unlimited bytes
nextcloud_db_1 | Max file locks unlimited unlimited locks
nextcloud_db_1 | Max pending signals 1545098 1545098 signals
nextcloud_db_1 | Max msgqueue size 819200 819200 bytes
nextcloud_db_1 | Max nice priority 0 0
nextcloud_db_1 | Max realtime priority 0 0
nextcloud_db_1 | Max realtime timeout unlimited unlimited us
nextcloud_db_1 | Core pattern: co...
nextcloud_db_1 | Fatal signal 11 while backtracing
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 https://mariadb.com/kb/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: 10.4.13-MariaDB-1:10.4.13+maria~bionic
key_buffer_size=134217728
read_buffer_size=2097152
max_used_connections=0
max_threads=102
thread_count=4
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 760255 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7fa650000c08
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 = 0x7fa674ff0c08 thread_stack 0x49000
2020-05-15 0:01:32 0 [Note] InnoDB: 10.4.13 started; log sequence number 8312011765; transaction id 20582626
2020-05-15 0:01:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysqld(my_print_stacktrace+0x2e)[0x55e945e98e8e]
mysqld(handle_fatal_signal+0x515)[0x55e945914915]
2020-05-15 0:01:32 0 [Note] Plugin 'FEEDBACK' is disabled.
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7fa6aeddc890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7fa6ad710e97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7fa6ad712801]
mysqld(+0x57c53c)[0x55e94562153c]
mysqld(+0xb35506)[0x55e945bda506]
mysqld(+0xb35d5d)[0x55e945bdad5d]
mysqld(+0xb39a55)[0x55e945bdea55]
mysqld(+0xb1c16e)[0x55e945bc116e]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7fa6aedd16db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fa6ad7f388f]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0):
Connection ID (thread ID): 4
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
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.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes unlimited unlimited processes
Max open files 1048576 1048576 files
Max locked memory 16777216 16777216 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 1545098 1545098 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: co...
Fatal signal 11 while backtracing
도커 로그에 있습니다.이건 저한테 너무 복잡해 보이고 저는 전혀 모르겠어요.
설정을 변경하지 않았습니다.말씀드린 것처럼 저는 거의 2년 동안 도커를 사용하고 있으며, 시간이 지남에 따라 도커-compose.yml 파일이 약간 변경되었습니다.하지만 이 문제는 방금 나타났고 저는 약 3~4개월 동안 아무것도 바꾸지 않았습니다.
그것이 큰 데이터베이스와 관련이 있다는 것이 가능합니까?저는 넥스트클라우드 뉴스를 사용하고 있으며 머신러닝 데이터 처리에 사용하기 때문에 어떤 항목도 삭제하지 않습니다.그래서 데이터베이스가 조금 클 수도 있습니다.
mysqdump 후 oc_news_items 테이블의 크기는 약 170MB이며 마지막 자동 덤프(오늘 아침)는 손상된 것처럼 보이지 않지만 의심스러운 99991개의 행이 있습니다.그렇다면 DB에 99999줄이 넘는 다음 클라우드 뉴스 항목에 문제가 있는 것이 아닐까요?아니면 단지 우연일 수도 있습니다.
이것은 MariaDB 서버 문제입니다.버그로 보고합니다. https://mariadb.com/kb/en/reporting-bugs .
그동안 mariadb를 이전 버전에 고정합니다.
image: mariadb:10.4.12
MySQL my.cnf thread_cache_size에서 제거하거나 줄 앞에 #과 공백을 삽입합니다.스레드 기아를 방지합니다.또한 read_buffer_size를 제거하거나 사용하지 않도록 설정하여 기본 크기를 허용하고 handler_read_next Rate Per Second(초당 속도)를 줄이고 성능을 향상시킵니다.mysql을 중지/다시 시작합니다.
언급URL : https://stackoverflow.com/questions/61809270/how-to-discover-why-mariadb-crashes
'programing' 카테고리의 다른 글
조건부 춘두 생성 (0) | 2023.08.29 |
---|---|
라라벨에서 BelongsToHasOne과 HasOne의 차이점은 무엇입니까? (0) | 2023.08.29 |
일반 오류 해결 방법: 2006 MySQL 서버가 사라졌습니다. (0) | 2023.08.29 |
제거/무시 방법: 터치 장치에서 css 스타일을 호버합니다. (0) | 2023.08.29 |
플럭스를 올바르게 읽고 단일 입력 스트림으로 변환하는 방법 (0) | 2023.08.29 |