資料庫作業正常然后作業幾天之后就會無故連接不上,重啟資料庫后就可以正常使用!!
mysql日志
170720 10:25:08 [Note] Event Scheduler: Purging the queue. 0 events
170720 10:25:08 InnoDB: Starting shutdown...
170720 10:25:08 InnoDB: Shutdown completed; log sequence number 1789395
170720 10:25:08 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
170720 10:25:09 [Note] Plugin 'FEDERATED' is disabled.
170720 10:25:09 InnoDB: The InnoDB memory heap is disabled
170720 10:25:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170720 10:25:09 InnoDB: Compressed tables use zlib 1.2.7
170720 10:25:09 InnoDB: Initializing buffer pool, size = 64.0M
170720 10:25:09 InnoDB: Completed initialization of buffer pool
170720 10:25:09 InnoDB: highest supported file format is Barracuda.
170720 10:25:09 InnoDB: Waiting for the background threads to start
170720 10:25:10 InnoDB: 5.5.56 started; log sequence number 1789395
170720 10:25:10 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170720 10:25:10 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170720 10:25:10 [Note] Server socket created on IP: '0.0.0.0'.
170720 10:25:10 [Note] Event Scheduler: Loaded 0 events
170720 10:25:10 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
170722 15:30:47 [Note] Plugin 'FEDERATED' is disabled.
170722 15:30:47 InnoDB: The InnoDB memory heap is disabled
170722 15:30:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170722 15:30:47 InnoDB: Compressed tables use zlib 1.2.7
170722 15:30:47 InnoDB: Initializing buffer pool, size = 64.0M
InnoDB: mmap(68681728 bytes) failed; errno 12
170722 15:30:47 InnoDB: Completed initialization of buffer pool
170722 15:30:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170722 15:30:47 [ERROR] Plugin 'InnoDB' init function returned error.
170722 15:30:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170722 15:30:47 [ERROR] Unknown/unsupported storage engine: InnoDB
170722 15:30:47 [ERROR] Aborting
170722 15:30:47 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
170722 23:07:32 [Note] Plugin 'FEDERATED' is disabled.
170722 23:07:32 InnoDB: The InnoDB memory heap is disabled
170722 23:07:32 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170722 23:07:32 InnoDB: Compressed tables use zlib 1.2.7
170722 23:07:32 InnoDB: Initializing buffer pool, size = 64.0M
170722 23:07:32 InnoDB: Completed initialization of buffer pool
170722 23:07:32 InnoDB: highest supported file format is Barracuda.
170722 23:07:32 InnoDB: Waiting for the background threads to start
170722 23:07:33 InnoDB: 5.5.56 started; log sequence number 1789395
170722 23:07:33 [Note] Recovering after a crash using mysql-bin
170722 23:07:33 [Note] Starting crash recovery...
170722 23:07:33 [Note] Crash recovery finished.
170722 23:07:33 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170722 23:07:33 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170722 23:07:33 [Note] Server socket created on IP: '0.0.0.0'.
170722 23:07:33 [Note] Event Scheduler: Loaded 0 events
170722 23:07:33 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
170725 17:53:00 [Note] Plugin 'FEDERATED' is disabled.
170725 17:53:00 InnoDB: The InnoDB memory heap is disabled
170725 17:53:00 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170725 17:53:00 InnoDB: Compressed tables use zlib 1.2.7
170725 17:53:00 InnoDB: Initializing buffer pool, size = 64.0M
170725 17:53:00 InnoDB: Completed initialization of buffer pool
170725 17:53:00 InnoDB: highest supported file format is Barracuda.
170725 17:53:01 InnoDB: Waiting for the background threads to start
170725 17:53:02 InnoDB: 5.5.56 started; log sequence number 1789395
170725 17:53:02 [Note] Recovering after a crash using mysql-bin
170725 17:53:02 [Note] Starting crash recovery...
170725 17:53:02 [Note] Crash recovery finished.
170725 17:53:02 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170725 17:53:02 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170725 17:53:02 [Note] Server socket created on IP: '0.0.0.0'.
170725 17:53:02 [Note] Event Scheduler: Loaded 0 events
170725 17:53:02 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
170725 17:53:05 [Note] Plugin 'FEDERATED' is disabled.
170725 17:53:05 InnoDB: The InnoDB memory heap is disabled
170725 17:53:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170725 17:53:05 InnoDB: Compressed tables use zlib 1.2.7
170725 17:53:05 InnoDB: Initializing buffer pool, size = 64.0M
InnoDB: mmap(68681728 bytes) failed; errno 12
170725 17:53:05 InnoDB: Completed initialization of buffer pool
170725 17:53:05 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170725 17:53:05 [ERROR] Plugin 'InnoDB' init function returned error.
170725 17:53:05 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170725 17:53:05 [ERROR] Unknown/unsupported storage engine: InnoDB
170725 17:53:05 [ERROR] Aborting
170725 17:53:05 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
170725 18:37:57 [Note] Plugin 'FEDERATED' is disabled.
170725 18:37:57 InnoDB: The InnoDB memory heap is disabled
170725 18:37:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170725 18:37:57 InnoDB: Compressed tables use zlib 1.2.7
170725 18:37:57 InnoDB: Initializing buffer pool, size = 64.0M
170725 18:37:57 InnoDB: Completed initialization of buffer pool
170725 18:37:57 InnoDB: highest supported file format is Barracuda.
170725 18:37:57 InnoDB: Waiting for the background threads to start
170725 18:37:58 InnoDB: 5.5.56 started; log sequence number 1789395
170725 18:37:58 [Note] Recovering after a crash using mysql-bin
170725 18:37:58 [Note] Starting crash recovery...
170725 18:37:58 [Note] Crash recovery finished.
170725 18:37:58 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170725 18:37:58 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170725 18:37:58 [Note] Server socket created on IP: '0.0.0.0'.
170725 18:37:58 [Note] Event Scheduler: Loaded 0 events
170725 18:37:58 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
170726 19:54:39 [Note] Plugin 'FEDERATED' is disabled.
170726 19:54:39 InnoDB: The InnoDB memory heap is disabled
170726 19:54:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170726 19:54:39 InnoDB: Compressed tables use zlib 1.2.7
170726 19:54:39 InnoDB: Initializing buffer pool, size = 64.0M
InnoDB: mmap(68681728 bytes) failed; errno 12
170726 19:54:39 InnoDB: Completed initialization of buffer pool
170726 19:54:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170726 19:54:39 [ERROR] Plugin 'InnoDB' init function returned error.
170726 19:54:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170726 19:54:39 [ERROR] Unknown/unsupported storage engine: InnoDB
170726 19:54:39 [ERROR] Aborting
170726 19:54:39 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
170727 8:39:52 [Note] Plugin 'FEDERATED' is disabled.
170727 8:39:52 InnoDB: The InnoDB memory heap is disabled
170727 8:39:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170727 8:39:52 InnoDB: Compressed tables use zlib 1.2.7
170727 8:39:52 InnoDB: Initializing buffer pool, size = 64.0M
170727 8:39:52 InnoDB: Completed initialization of buffer pool
170727 8:39:52 InnoDB: highest supported file format is Barracuda.
170727 8:39:52 InnoDB: Waiting for the background threads to start
170727 8:39:53 InnoDB: 5.5.56 started; log sequence number 1789395
170727 8:39:53 [Note] Recovering after a crash using mysql-bin
170727 8:39:53 [Note] Starting crash recovery...
170727 8:39:53 [Note] Crash recovery finished.
170727 8:39:53 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170727 8:39:53 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170727 8:39:53 [Note] Server socket created on IP: '0.0.0.0'.
170727 8:39:53 [Note] Event Scheduler: Loaded 0 events
170727 8:39:53 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.56-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
uj5u.com熱心網友回復:
從日志里并滅有看到什么相關的mysql的報錯資訊,除了innodb引擎那個uj5u.com熱心網友回復:
Fatal error: cannot allocate memory for the buffer pool不知道是不是設定的緩沖區太大所以出錯了
檢查下配置吧
uj5u.com熱心網友回復:
記憶體分配不足所以失敗。日志里面說的很明白就是 mysql要占用記憶體的時候 物理記憶體不夠用導致的,所以修改 vim /etc/my.cnf
[inonodb]
innodb_buffer_pool_size=64MB 把這個數值改小,或者增大你的服務器記憶體。
如果正常運行幾天后發現資料庫連接不上,你可以監控一下你機器的記憶體使用情況,看看有沒有記憶體泄漏,或者確實機器記憶體太小,隨著應用的增多而不夠使用。
uj5u.com熱心網友回復:
不一定是連接不上,可能是有延遲,所以導致提示無法連接轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/118081.html
標籤:MySQL
下一篇:MySQL
