connect error: connection refused 에러 로그 확인좀요
본문
connect error: connection refused 에러
마리아 디비 상태를 확인했을때 입니다.
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: inactive (dead) since 금 2019-12-27 18:08:04 KST; 18h ago
Process: 3244 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 3243 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 3149 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 3243 (code=exited, status=0/SUCCESS)
12월 26 09:42:21 vultr.guest systemd[1]: Starting MariaDB database server...
12월 26 09:42:21 vultr.guest mariadb-prepare-db-dir[3149]: Database MariaDB is probably initialized i...e.
12월 26 09:42:21 vultr.guest mariadb-prepare-db-dir[3149]: If this is not the case, make sure the /va...r.
12월 26 09:42:22 vultr.guest mysqld_safe[3243]: 191226 09:42:22 mysqld_safe Logging to '/var/log/mar...g'.
12월 26 09:42:22 vultr.guest mysqld_safe[3243]: 191226 09:42:22 mysqld_safe Starting mysqld daemon w...sql
12월 26 09:42:23 vultr.guest systemd[1]: Started MariaDB database server.
Hint: Some lines were ellipsized, use -l to show in full.
마리아 디비 로그를 확인했을때 입니다.
191227 18:08:03 mysqld_safe Number of processes running now: 0
191227 18:08:03 mysqld_safe mysqld restarted
191227 18:08:03 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 30221 ...
191227 18:08:03 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
191227 18:08:03 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
191227 18:08:03 [ERROR] mysqld: Out of memory (Needed 72499200 bytes)
191227 18:08:03 InnoDB: The InnoDB memory heap is disabled
191227 18:08:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191227 18:08:03 InnoDB: Compressed tables use zlib 1.2.7
191227 18:08:03 InnoDB: Using Linux native AIO
191227 18:08:03 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
191227 18:08:03 InnoDB: Completed initialization of buffer pool
191227 18:08:03 InnoDB: Fatal error: cannot allocate memory for the buffer pool
191227 18:08:03 [ERROR] Plugin 'InnoDB' init function returned error.
191227 18:08:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
191227 18:08:03 [Note] Plugin 'FEEDBACK' is disabled.
191227 18:08:03 [ERROR] Unknown/unsupported storage engine: InnoDB
191227 18:08:03 [ERROR] Aborting
191227 18:08:03 [Note] /usr/libexec/mysqld: Shutdown complete
191227 18:08:04 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
로그를 확인하니 이렇게 찍힙니다. 어떻게 해결을 해야 할까요?
답변 4
슬로우쿼리 또는 인젝션 이슈 확인하셔야 할듯합니다
innodb_buffer_pool_size 를 줄여 보세요.
메모리가 부족해서 mariadb 서버가 제대로 시작이 안되었습니다.
1. 가용램을 늘려보세요.
2. 구성 파일에서 innodb-buffer-pool 크기의 값을 조정해보세요.