caiheqing 发表于 2023-9-1 15:54:24

最近数据库无缘无故中断,导致网站连接不上

如标题:本周一直出现这个现象,显示:ERROR! MySQL server PID file could not be found!,每次都要重启数据库,但这样也不是方法,网上百度教程也查了原因,但还是无法解决。我看了一下服务器内存还是够用的,下面是mysql出错日志,不是很会看

2023-09-01 03:51:20 7347 Plugin 'FEDERATED' is disabled.
2023-09-01 03:51:20 7347 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 03:51:20 7347 InnoDB: The InnoDB memory heap is disabled
2023-09-01 03:51:20 7347 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 03:51:20 7347 InnoDB: Memory barrier is not used
2023-09-01 03:51:20 7347 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 03:51:20 7347 InnoDB: Using Linux native AIO
2023-09-01 03:51:20 7347 InnoDB: Not using CPU crc32 instructions
2023-09-01 03:51:20 7347 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 03:51:20 7347 InnoDB: Completed initialization of buffer pool
2023-09-01 03:51:20 7347 InnoDB: Highest supported file format is Barracuda.
2023-09-01 03:51:20 7347 InnoDB: The log sequence numbers 974900664 and 974900664 in ibdata files do not match the log sequence number 978023737 in the ib_logfiles!
2023-09-01 03:51:20 7347 InnoDB: Database was not shutdown normally!
2023-09-01 03:51:20 7347 InnoDB: Starting crash recovery.
2023-09-01 03:51:20 7347 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 03:51:20 7347 InnoDB: Restoring possible half-written data pages
2023-09-01 03:51:20 7347 InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 663425, file name mysql-bin.000047
2023-09-01 03:51:20 7347 InnoDB: 128 rollback segment(s) are active.
2023-09-01 03:51:20 7347 InnoDB: Waiting for purge to start
2023-09-01 03:51:20 7347 InnoDB: 5.6.51 started; log sequence number 978023737
2023-09-01 03:51:20 7347 Recovering after a crash using mysql-bin
2023-09-01 03:51:21 7347 Starting crash recovery...
2023-09-01 03:51:21 7347 Crash recovery finished.
2023-09-01 03:51:21 7347 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 03:51:21 7347 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 03:51:21 7347 Server hostname (bind-address): '*'; port: 3306
2023-09-01 03:51:21 7347 IPv6 is available.
2023-09-01 03:51:21 7347    - '::' resolves to '::';
2023-09-01 03:51:21 7347 Server socket created on IP: '::'.
2023-09-01 03:51:21 7347 Event Scheduler: Loaded 0 events
2023-09-01 03:51:21 7347 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.51-log'socket: '/tmp/mysql.sock'port: 3306Source distribution
2023-09-01 03:51:24 7384 Plugin 'FEDERATED' is disabled.
2023-09-01 03:51:24 7384 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 03:51:24 7384 InnoDB: The InnoDB memory heap is disabled
2023-09-01 03:51:24 7384 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 03:51:24 7384 InnoDB: Memory barrier is not used
2023-09-01 03:51:24 7384 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 03:51:24 7384 InnoDB: Using Linux native AIO
2023-09-01 03:51:24 7384 InnoDB: Not using CPU crc32 instructions
2023-09-01 03:51:24 7384 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 03:51:24 7384 InnoDB: Completed initialization of buffer pool
2023-09-01 03:51:24 7384 InnoDB: Highest supported file format is Barracuda.
2023-09-01 03:51:24 7384 InnoDB: The log sequence numbers 974900664 and 974900664 in ibdata files do not match the log sequence number 978023747 in the ib_logfiles!
2023-09-01 03:51:24 7384 InnoDB: Database was not shutdown normally!
2023-09-01 03:51:24 7384 InnoDB: Starting crash recovery.
2023-09-01 03:51:24 7384 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 03:51:24 7384 InnoDB: Restoring possible half-written data pages
2023-09-01 03:51:24 7384 InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 663425, file name mysql-bin.000047
2023-09-01 03:51:25 7384 InnoDB: 128 rollback segment(s) are active.
2023-09-01 03:51:25 7384 InnoDB: Waiting for purge to start
2023-09-01 03:51:25 7384 InnoDB: 5.6.51 started; log sequence number 978023747
2023-09-01 03:51:25 7384 Recovering after a crash using mysql-bin
2023-09-01 03:51:25 7384 Starting crash recovery...
2023-09-01 03:51:25 7384 Crash recovery finished.
2023-09-01 03:51:25 7384 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 03:51:25 7384 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 03:51:25 7384 Server hostname (bind-address): '*'; port: 3306
2023-09-01 03:51:25 7384 IPv6 is available.
2023-09-01 03:51:25 7384    - '::' resolves to '::';
2023-09-01 03:51:25 7384 Server socket created on IP: '::'.
2023-09-01 03:51:25 7384 Event Scheduler: Loaded 0 events
2023-09-01 03:51:25 7384 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.51-log'socket: '/tmp/mysql.sock'port: 3306Source distribution
2023-09-01 03:51:55 7433 Plugin 'FEDERATED' is disabled.
2023-09-01 03:51:55 7433 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 03:51:55 7433 InnoDB: The InnoDB memory heap is disabled
2023-09-01 03:51:55 7433 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 03:51:55 7433 InnoDB: Memory barrier is not used
2023-09-01 03:51:55 7433 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 03:51:55 7433 InnoDB: Using Linux native AIO
2023-09-01 03:51:55 7433 InnoDB: Not using CPU crc32 instructions
2023-09-01 03:51:55 7433 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 03:51:55 7433 InnoDB: Completed initialization of buffer pool
2023-09-01 03:51:55 7433 InnoDB: Highest supported file format is Barracuda.
2023-09-01 03:51:55 7433 InnoDB: The log sequence numbers 974900664 and 974900664 in ibdata files do not match the log sequence number 978024421 in the ib_logfiles!
2023-09-01 03:51:55 7433 InnoDB: Database was not shutdown normally!
2023-09-01 03:51:55 7433 InnoDB: Starting crash recovery.
2023-09-01 03:51:55 7433 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 03:51:55 7433 InnoDB: Restoring possible half-written data pages
2023-09-01 03:51:55 7433 InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 472, file name mysql-bin.000049
2023-09-01 03:51:55 7433 InnoDB: 128 rollback segment(s) are active.
2023-09-01 03:51:55 7433 InnoDB: Waiting for purge to start
2023-09-01 03:51:55 7433 InnoDB: 5.6.51 started; log sequence number 978024421
2023-09-01 03:51:55 7433 Recovering after a crash using mysql-bin
2023-09-01 03:51:55 7433 Starting crash recovery...
2023-09-01 03:51:55 7433 Crash recovery finished.
2023-09-01 03:51:55 7433 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 03:51:55 7433 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 03:51:55 7433 Server hostname (bind-address): '*'; port: 3306
2023-09-01 03:51:55 7433 IPv6 is available.
2023-09-01 03:51:55 7433    - '::' resolves to '::';
2023-09-01 03:51:55 7433 Server socket created on IP: '::'.
2023-09-01 03:51:56 7433 Event Scheduler: Loaded 0 events
2023-09-01 03:51:56 7433 /usr/local/mysql/bin/mysqld: ready for connections.




caiheqing 发表于 2023-9-1 15:54:55

Version: '5.6.51-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
2023-09-01 03:52:09 7500 Plugin 'FEDERATED' is disabled.
2023-09-01 03:52:09 7500 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 03:52:09 7500 InnoDB: The InnoDB memory heap is disabled
2023-09-01 03:52:09 7500 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 03:52:09 7500 InnoDB: Memory barrier is not used
2023-09-01 03:52:09 7500 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 03:52:09 7500 InnoDB: Using Linux native AIO
2023-09-01 03:52:09 7500 InnoDB: Not using CPU crc32 instructions
2023-09-01 03:52:09 7500 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 03:52:09 7500 InnoDB: Completed initialization of buffer pool
2023-09-01 03:52:09 7500 InnoDB: Highest supported file format is Barracuda.
2023-09-01 03:52:09 7500 InnoDB: The log sequence numbers 974900664 and 974900664 in ibdata files do not match the log sequence number 978024461 in the ib_logfiles!
2023-09-01 03:52:09 7500 InnoDB: Database was not shutdown normally!
2023-09-01 03:52:09 7500 InnoDB: Starting crash recovery.
2023-09-01 03:52:09 7500 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 03:52:09 7500 InnoDB: Restoring possible half-written data pages
2023-09-01 03:52:09 7500 InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 472, file name mysql-bin.000049
2023-09-01 03:52:09 7500 InnoDB: 128 rollback segment(s) are active.
2023-09-01 03:52:09 7500 InnoDB: Waiting for purge to start
2023-09-01 03:52:09 7500 InnoDB: 5.6.51 started; log sequence number 978024461
2023-09-01 03:52:09 7500 Recovering after a crash using mysql-bin
2023-09-01 03:52:09 7500 Starting crash recovery...
2023-09-01 03:52:09 7500 Crash recovery finished.
2023-09-01 03:52:09 7500 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 03:52:09 7500 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 03:52:09 7500 Server hostname (bind-address): '*'; port: 3306
2023-09-01 03:52:09 7500 IPv6 is available.
2023-09-01 03:52:09 7500 - '::' resolves to '::';
2023-09-01 03:52:09 7500 Server socket created on IP: '::'.
2023-09-01 03:52:09 7500 Event Scheduler: Loaded 0 events
2023-09-01 03:52:09 7500 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.51-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
2023-09-01 03:52:11 7537 Plugin 'FEDERATED' is disabled.
2023-09-01 03:52:11 7537 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 03:52:11 7537 InnoDB: The InnoDB memory heap is disabled
2023-09-01 03:52:11 7537 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 03:52:11 7537 InnoDB: Memory barrier is not used
2023-09-01 03:52:11 7537 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 03:52:11 7537 InnoDB: Using Linux native AIO
2023-09-01 03:52:11 7537 InnoDB: Not using CPU crc32 instructions
2023-09-01 03:52:11 7537 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 03:52:11 7537 InnoDB: Completed initialization of buffer pool
2023-09-01 03:52:12 7537 InnoDB: Highest supported file format is Barracuda.
2023-09-01 03:52:12 7537 InnoDB: Log scan progressed past the checkpoint lsn 978024461
2023-09-01 03:52:12 7537 InnoDB: Database was not shutdown normally!
2023-09-01 03:52:12 7537 InnoDB: Starting crash recovery.
2023-09-01 03:52:12 7537 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 03:52:12 7537 InnoDB: Restoring possible half-written data pages
2023-09-01 03:52:12 7537 InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 978024471
InnoDB: Last MySQL binlog file position 0 472, file name mysql-bin.000049
2023-09-01 03:52:12 7537 InnoDB: 128 rollback segment(s) are active.
2023-09-01 03:52:12 7537 InnoDB: Waiting for purge to start
2023-09-01 03:52:12 7537 InnoDB: 5.6.51 started; log sequence number 978024471
2023-09-01 03:52:12 7537 Recovering after a crash using mysql-bin
2023-09-01 03:52:12 7537 Starting crash recovery...
2023-09-01 03:52:12 7537 Crash recovery finished.
2023-09-01 03:52:12 7537 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 03:52:12 7537 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 03:52:12 7537 Server hostname (bind-address): '*'; port: 3306
2023-09-01 03:52:12 7537 IPv6 is available.
2023-09-01 03:52:12 7537 - '::' resolves to '::';
2023-09-01 03:52:12 7537 Server socket created on IP: '::'.
2023-09-01 03:52:13 7572 Plugin 'FEDERATED' is disabled.
2023-09-01 03:52:13 7572 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 03:52:13 7572 InnoDB: The InnoDB memory heap is disabled
2023-09-01 03:52:13 7572 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 03:52:13 7572 InnoDB: Memory barrier is not used
2023-09-01 03:52:13 7572 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 03:52:13 7572 InnoDB: Using Linux native AIO
2023-09-01 03:52:13 7572 InnoDB: Not using CPU crc32 instructions
2023-09-01 03:52:13 7572 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 03:52:13 7572 InnoDB: Completed initialization of buffer pool
2023-09-01 03:52:13 7572 InnoDB: Highest supported file format is Barracuda.
2023-09-01 03:52:13 7572 InnoDB: Log scan progressed past the checkpoint lsn 978024461
2023-09-01 03:52:13 7572 InnoDB: Database was not shutdown normally!
2023-09-01 03:52:13 7572 InnoDB: Starting crash recovery.
2023-09-01 03:52:13 7572 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 08:59:05 17387 Plugin 'FEDERATED' is disabled.
2023-09-01 08:59:05 17387 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 08:59:05 17387 InnoDB: The InnoDB memory heap is disabled
2023-09-01 08:59:05 17387 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 08:59:05 17387 InnoDB: Memory barrier is not used
2023-09-01 08:59:05 17387 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 08:59:05 17387 InnoDB: Using Linux native AIO
2023-09-01 08:59:05 17387 InnoDB: Not using CPU crc32 instructions
2023-09-01 08:59:05 17387 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 08:59:05 17387 InnoDB: Completed initialization of buffer pool
2023-09-01 08:59:05 17387 InnoDB: Highest supported file format is Barracuda.
2023-09-01 08:59:05 17387 InnoDB: Log scan progressed past the checkpoint lsn 978024461
2023-09-01 08:59:05 17387 InnoDB: Database was not shutdown normally!
2023-09-01 08:59:05 17387 InnoDB: Starting crash recovery.
2023-09-01 08:59:05 17387 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 08:59:05 17387 InnoDB: Restoring possible half-written data pages
2023-09-01 08:59:05 17387 InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 978024471
InnoDB: Last MySQL binlog file position 0 472, file name mysql-bin.000049
2023-09-01 08:59:05 17387 InnoDB: 128 rollback segment(s) are active.
2023-09-01 08:59:05 17387 InnoDB: Waiting for purge to start
2023-09-01 08:59:05 17387 InnoDB: 5.6.51 started; log sequence number 978024471
2023-09-01 08:59:05 17387 Recovering after a crash using mysql-bin
2023-09-01 08:59:05 17387 Starting crash recovery...
2023-09-01 08:59:05 17387 Crash recovery finished.
2023-09-01 08:59:05 17387 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 08:59:05 17387 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 08:59:05 17387 Server hostname (bind-address): '*'; port: 3306
2023-09-01 08:59:05 17387 IPv6 is available.
2023-09-01 08:59:05 17387 - '::' resolves to '::';
2023-09-01 08:59:05 17387 Server socket created on IP: '::'.
2023-09-01 08:59:06 17387 Event Scheduler: Loaded 0 events
2023-09-01 08:59:06 17387 /usr/local/mysql/bin/mysqld: ready for connections.

caiheqing 发表于 2023-9-1 15:55:00

Version: '5.6.51-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
2023-09-01 14:11:53 26214 Plugin 'FEDERATED' is disabled.
2023-09-01 14:11:53 26214 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 14:11:53 26214 InnoDB: The InnoDB memory heap is disabled
2023-09-01 14:11:53 26214 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 14:11:53 26214 InnoDB: Memory barrier is not used
2023-09-01 14:11:53 26214 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 14:11:53 26214 InnoDB: Using Linux native AIO
2023-09-01 14:11:53 26214 InnoDB: Not using CPU crc32 instructions
2023-09-01 14:11:53 26214 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 14:11:53 26214 InnoDB: Completed initialization of buffer pool
2023-09-01 14:11:53 26214 InnoDB: Highest supported file format is Barracuda.
2023-09-01 14:11:53 26214 InnoDB: The log sequence numbers 974900664 and 974900664 in ibdata files do not match the log sequence number 978547493 in the ib_logfiles!
2023-09-01 14:11:53 26214 InnoDB: Database was not shutdown normally!
2023-09-01 14:11:53 26214 InnoDB: Starting crash recovery.
2023-09-01 14:11:53 26214 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 14:11:54 26214 InnoDB: Restoring possible half-written data pages
2023-09-01 14:11:54 26214 InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 288483, file name mysql-bin.000053
2023-09-01 14:11:54 26214 InnoDB: 128 rollback segment(s) are active.
2023-09-01 14:11:54 26214 InnoDB: Waiting for purge to start
2023-09-01 14:11:54 26214 InnoDB: 5.6.51 started; log sequence number 978547493
2023-09-01 14:11:54 26214 Recovering after a crash using mysql-bin
2023-09-01 14:11:54 26214 Starting crash recovery...
2023-09-01 14:11:54 26214 Crash recovery finished.
2023-09-01 14:11:54 26214 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 14:11:54 26214 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 14:11:54 26214 Server hostname (bind-address): '*'; port: 3306
2023-09-01 14:11:54 26214 IPv6 is available.
2023-09-01 14:11:54 26214 - '::' resolves to '::';
2023-09-01 14:11:54 26214 Server socket created on IP: '::'.
2023-09-01 14:11:54 26214 Event Scheduler: Loaded 0 events
2023-09-01 14:11:54 26214 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.51-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
2023-09-01 14:12:22 26321 Plugin 'FEDERATED' is disabled.
2023-09-01 14:12:22 26321 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 14:12:22 26321 InnoDB: The InnoDB memory heap is disabled
2023-09-01 14:12:22 26321 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 14:12:22 26321 InnoDB: Memory barrier is not used
2023-09-01 14:12:22 26321 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 14:12:22 26321 InnoDB: Using Linux native AIO
2023-09-01 14:12:22 26321 InnoDB: Not using CPU crc32 instructions
2023-09-01 14:12:22 26321 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 14:12:22 26321 InnoDB: Completed initialization of buffer pool
2023-09-01 14:12:22 26321 InnoDB: Highest supported file format is Barracuda.
2023-09-01 14:12:22 26321 InnoDB: Log scan progressed past the checkpoint lsn 978547503
2023-09-01 14:12:22 26321 InnoDB: Database was not shutdown normally!
2023-09-01 14:12:22 26321 InnoDB: Starting crash recovery.
2023-09-01 14:12:22 26321 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 15:14:24 29040 Plugin 'FEDERATED' is disabled.
2023-09-01 15:14:24 29040 InnoDB: Using atomics to ref count buffer pool pages
2023-09-01 15:14:24 29040 InnoDB: The InnoDB memory heap is disabled
2023-09-01 15:14:24 29040 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-09-01 15:14:24 29040 InnoDB: Memory barrier is not used
2023-09-01 15:14:24 29040 InnoDB: Compressed tables use zlib 1.2.11
2023-09-01 15:14:24 29040 InnoDB: Using Linux native AIO
2023-09-01 15:14:24 29040 InnoDB: Not using CPU crc32 instructions
2023-09-01 15:14:24 29040 InnoDB: Initializing buffer pool, size = 256.0M
2023-09-01 15:14:24 29040 InnoDB: Completed initialization of buffer pool
2023-09-01 15:14:24 29040 InnoDB: Highest supported file format is Barracuda.
2023-09-01 15:14:24 29040 InnoDB: Log scan progressed past the checkpoint lsn 978547503
2023-09-01 15:14:24 29040 InnoDB: Database was not shutdown normally!
2023-09-01 15:14:24 29040 InnoDB: Starting crash recovery.
2023-09-01 15:14:24 29040 InnoDB: Reading tablespace information from the .ibd files...
2023-09-01 15:14:24 29040 InnoDB: Restoring possible half-written data pages
2023-09-01 15:14:24 29040 InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 978548164
2023-09-01 15:14:24 29040 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 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
InnoDB: Last MySQL binlog file position 0 473, file name mysql-bin.000054
2023-09-01 15:14:25 29040 InnoDB: 128 rollback segment(s) are active.
2023-09-01 15:14:25 29040 InnoDB: Waiting for purge to start
2023-09-01 15:14:25 29040 InnoDB: 5.6.51 started; log sequence number 978548164
2023-09-01 15:14:25 29040 Recovering after a crash using mysql-bin
2023-09-01 15:14:25 29040 Starting crash recovery...
2023-09-01 15:14:25 29040 Crash recovery finished.
2023-09-01 15:14:25 29040 RSA private key file not found: /usr/local/mysql/var//private_key.pem. Some authentication plugins will not work.
2023-09-01 15:14:25 29040 RSA public key file not found: /usr/local/mysql/var//public_key.pem. Some authentication plugins will not work.
2023-09-01 15:14:25 29040 Server hostname (bind-address): '*'; port: 3306
2023-09-01 15:14:25 29040 IPv6 is available.
2023-09-01 15:14:25 29040 - '::' resolves to '::';
2023-09-01 15:14:25 29040 Server socket created on IP: '::'.
2023-09-01 15:14:25 29040 Event Scheduler: Loaded 0 events
2023-09-01 15:14:25 29040 /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.6.51-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution

licess 发表于 2023-9-2 09:57:26

你看一下系统日志,搜一下有没有 Out Of Memory 或 killed 之类的信息,有的话就是内存不够用

caiheqing 发表于 2023-9-2 13:17:38

licess 发表于 2023-9-2 09:57
你看一下系统日志,搜一下有没有 Out Of Memory 或 killed 之类的信息,有的话就是内存不够用
...

谢谢军哥的回复,我查看了一下/var/log/messages这个文件,确实有如你所说的out of memory:ikill process 1380 或者kidded process 1380这些字眼,如下图:
http://objectmc2.oss-cn-shenzhen.aliyuncs.com/yhdoc/20230902/20230902131323851721990.jpeg
但我查看我服务器内存使用情况好像还有很多,如下图:
http://objectmc2.oss-cn-shenzhen.aliyuncs.com/yhdoc/20230902/202309021316261868306539.jpeg
像这种情况,难道是要再加大内存吗?或者除了这个,还有其他方法吗?

licess 发表于 2023-9-3 10:51:13

caiheqing 发表于 2023-9-2 13:17
谢谢军哥的回复,我查看了一下/var/log/messages这个文件,确实有如你所说的out of memory:ikill process ...

可以通过OOM Killer不让系统kill
不过加内存一般才会真正解决

caiheqing 发表于 2023-9-3 17:13:36

licess 发表于 2023-9-3 10:51
可以通过OOM Killer不让系统kill
不过加内存一般才会真正解决

谢谢军哥回复,这个oom killer如何设置呢?在你论坛搜索没有,百度上也很少,这个是直接开启还是?

licess 发表于 2023-9-5 16:21:52

caiheqing 发表于 2023-9-3 17:13
谢谢军哥回复,这个oom killer如何设置呢?在你论坛搜索没有,百度上也很少,这个是直接开启还是? ...

比如mysql被kill掉了,ps aux|grep mysqld 确定mysqld的进程ID,如PID为1234
则 echo -15 > /proc/1234/oom_score_adj
页: [1]
查看完整版本: 最近数据库无缘无故中断,导致网站连接不上