VPS侦探论坛

 找回密码
 注册
查看: 4318|回复: 9

lnmp的mysql服务无辜挂掉

[复制链接]
发表于 2017-3-11 14:04:37 | 显示全部楼层 |阅读模式

军哥你好:
安装好lnmp 1.3之后,运行两个网站,但是mysql会挂掉,也没有时间的规律,突然就挂掉了,每次重启lnmp restart,就恢复了。

err的日志:

  1. 170311 11:06:04 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZbp1h44q15c9j13hfqfdeZ.pid ended
  2. 170311 12:01:26 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
  3. 2017-03-11 12:01:26 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 14585 ...
  4. 2017-03-11 12:01:26 14585 [Note] Plugin 'FEDERATED' is disabled.
  5. 2017-03-11 12:01:26 14585 [Note] InnoDB: Using atomics to ref count buffer pool pages
  6. 2017-03-11 12:01:26 14585 [Note] InnoDB: The InnoDB memory heap is disabled
  7. 2017-03-11 12:01:26 14585 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  8. 2017-03-11 12:01:26 14585 [Note] InnoDB: Memory barrier is not used
  9. 2017-03-11 12:01:26 14585 [Note] InnoDB: Compressed tables use zlib 1.2.3
  10. 2017-03-11 12:01:26 14585 [Note] InnoDB: Using CPU crc32 instructions
  11. 2017-03-11 12:01:26 14585 [Note] InnoDB: Initializing buffer pool, size = 256.0M
  12. 2017-03-11 12:01:26 14585 [Note] InnoDB: Completed initialization of buffer pool
  13. 2017-03-11 12:01:26 14585 [Note] InnoDB: Highest supported file format is Barracuda.
  14. 2017-03-11 12:01:26 14585 [Note] InnoDB: The log sequence numbers 1626130 and 1626130 in ibdata files do not match the log sequence number 1626140 in the ib_logfiles!
  15. 2017-03-11 12:01:26 14585 [Note] InnoDB: Database was not shutdown normally!
  16. 2017-03-11 12:01:26 14585 [Note] InnoDB: Starting crash recovery.
  17. 2017-03-11 12:01:26 14585 [Note] InnoDB: Reading tablespace information from the .ibd files...
  18. 2017-03-11 12:01:26 14585 [Note] InnoDB: Restoring possible half-written data pages
  19. 2017-03-11 12:01:26 14585 [Note] InnoDB: from the doublewrite buffer...
  20. 2017-03-11 12:01:26 14585 [Note] InnoDB: 128 rollback segment(s) are active.
  21. 2017-03-11 12:01:26 14585 [Note] InnoDB: Waiting for purge to start
  22. 2017-03-11 12:01:26 14585 [Note] InnoDB: 5.6.29 started; log sequence number 1626140
  23. 2017-03-11 12:01:26 14585 [Note] Recovering after a crash using mysql-bin
  24. 2017-03-11 12:01:27 14585 [Note] Starting crash recovery...
  25. 2017-03-11 12:01:27 14585 [Note] Crash recovery finished.
  26. 2017-03-11 12:01:27 14585 [Note] Server hostname (bind-address): '*'; port: 3306
  27. 2017-03-11 12:01:27 14585 [Note] IPv6 is available.
  28. 2017-03-11 12:01:27 14585 [Note]   - '::' resolves to '::';
  29. 2017-03-11 12:01:27 14585 [Note] Server socket created on IP: '::'.
  30. 2017-03-11 12:01:27 14585 [Note] Event Scheduler: Loaded 0 events
  31. 2017-03-11 12:01:27 14585 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
  32. Version: '5.6.29-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
复制代码




麻烦军哥看看,谢谢。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-3-12 13:40:07 | 显示全部楼层

回复 1# 的帖子



这个日子上没有具体的信息,可以往前再翻翻看看
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-3-12 14:31:01 | 显示全部楼层

谢谢军哥,今天4点收到短息说挂了,我把4点多的日志截取出来,您看看:
  1. 170311 23:43:55 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZbp1h44q15c9j13hfqfdeZ.pid ended
  2. 170311 23:47:14 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
  3. 2017-03-11 23:47:14 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 22570 ...
  4. 2017-03-11 23:47:14 22570 [Note] Plugin 'FEDERATED' is disabled.
  5. 2017-03-11 23:47:14 22570 [Note] InnoDB: Using atomics to ref count buffer pool pages
  6. 2017-03-11 23:47:14 22570 [Note] InnoDB: The InnoDB memory heap is disabled
  7. 2017-03-11 23:47:14 22570 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  8. 2017-03-11 23:47:14 22570 [Note] InnoDB: Memory barrier is not used
  9. 2017-03-11 23:47:14 22570 [Note] InnoDB: Compressed tables use zlib 1.2.3
  10. 2017-03-11 23:47:14 22570 [Note] InnoDB: Using CPU crc32 instructions
  11. 2017-03-11 23:47:14 22570 [Note] InnoDB: Initializing buffer pool, size = 64.0M
  12. 2017-03-11 23:47:14 22570 [Note] InnoDB: Completed initialization of buffer pool
  13. 2017-03-11 23:47:14 22570 [Note] InnoDB: Highest supported file format is Barracuda.
  14. 2017-03-11 23:47:14 22570 [Note] InnoDB: 128 rollback segment(s) are active.
  15. 2017-03-11 23:47:14 22570 [Note] InnoDB: Waiting for purge to start
  16. 2017-03-11 23:47:14 22570 [Note] InnoDB: 5.6.29 started; log sequence number 1626250
  17. 2017-03-11 23:47:14 22570 [Note] Server hostname (bind-address): '*'; port: 3306
  18. 2017-03-11 23:47:14 22570 [Note] IPv6 is available.
  19. 2017-03-11 23:47:14 22570 [Note]   - '::' resolves to '::';
  20. 2017-03-11 23:47:14 22570 [Note] Server socket created on IP: '::'.
  21. 2017-03-11 23:47:15 22570 [Note] Event Scheduler: Loaded 0 events
  22. 2017-03-11 23:47:15 22570 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
  23. Version: '5.6.29-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
  24. 170312 04:27:57 mysqld_safe Number of processes running now: 0
  25. 170312 04:27:57 mysqld_safe mysqld restarted
  26. 2017-03-12 04:27:57 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 24426 ...
  27. 2017-03-12 04:27:57 24426 [Note] Plugin 'FEDERATED' is disabled.
  28. 2017-03-12 04:27:57 24426 [Note] InnoDB: Using atomics to ref count buffer pool pages
  29. 2017-03-12 04:27:57 24426 [Note] InnoDB: The InnoDB memory heap is disabled
  30. 2017-03-12 04:27:57 24426 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  31. 2017-03-12 04:27:57 24426 [Note] InnoDB: Memory barrier is not used
  32. 2017-03-12 04:27:57 24426 [Note] InnoDB: Compressed tables use zlib 1.2.3
  33. 2017-03-12 04:27:57 24426 [Note] InnoDB: Using CPU crc32 instructions
  34. 2017-03-12 04:27:57 24426 [Note] InnoDB: Initializing buffer pool, size = 64.0M
  35. 2017-03-12 04:27:57 24426 [Note] InnoDB: Completed initialization of buffer pool
  36. 2017-03-12 04:27:57 24426 [Note] InnoDB: Highest supported file format is Barracuda.
  37. 2017-03-12 04:27:57 24426 [Note] InnoDB: The log sequence numbers 1626250 and 1626250 in ibdata files do not match the log sequence number 1626260 in the ib_logfiles!
  38. 2017-03-12 04:27:57 24426 [Note] InnoDB: Database was not shutdown normally!
  39. 2017-03-12 04:27:57 24426 [Note] InnoDB: Starting crash recovery.
  40. 2017-03-12 04:27:57 24426 [Note] InnoDB: Reading tablespace information from the .ibd files...
  41. 2017-03-12 04:27:58 24426 [Note] InnoDB: Restoring possible half-written data pages
  42. 2017-03-12 04:27:58 24426 [Note] InnoDB: from the doublewrite buffer...
  43. 2017-03-12 04:27:58 24426 [Note] InnoDB: 128 rollback segment(s) are active.
  44. 2017-03-12 04:27:58 24426 [Note] InnoDB: Waiting for purge to start
  45. 2017-03-12 04:27:58 24426 [Note] InnoDB: 5.6.29 started; log sequence number 1626260
  46. 2017-03-12 04:27:58 24426 [Note] Recovering after a crash using mysql-bin
  47. 2017-03-12 04:27:58 24426 [Note] Starting crash recovery...
  48. 2017-03-12 04:27:58 24426 [Note] Crash recovery finished.
  49. 2017-03-12 04:27:58 24426 [Note] Server hostname (bind-address): '*'; port: 3306
  50. 2017-03-12 04:27:58 24426 [Note] IPv6 is available.
  51. 2017-03-12 04:27:58 24426 [Note]   - '::' resolves to '::';
  52. 2017-03-12 04:27:58 24426 [Note] Server socket created on IP: '::'.
  53. 2017-03-12 04:27:58 24426 [Note] Event Scheduler: Loaded 0 events
  54. 2017-03-12 04:27:58 24426 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
  55. Version: '5.6.29-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
  56. 170312 04:28:38 mysqld_safe Number of processes running now: 0
  57. 170312 04:28:38 mysqld_safe mysqld restarted
  58. 2017-03-12 04:28:39 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 24471 ...
  59. 2017-03-12 04:28:39 24471 [Note] Plugin 'FEDERATED' is disabled.
  60. 2017-03-12 04:28:39 24471 [Note] InnoDB: Using atomics to ref count buffer pool pages
  61. 2017-03-12 04:28:39 24471 [Note] InnoDB: The InnoDB memory heap is disabled
  62. 2017-03-12 04:28:39 24471 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  63. 2017-03-12 04:28:39 24471 [Note] InnoDB: Memory barrier is not used
  64. 2017-03-12 04:28:39 24471 [Note] InnoDB: Compressed tables use zlib 1.2.3
  65. 2017-03-12 04:28:39 24471 [Note] InnoDB: Using CPU crc32 instructions
  66. 2017-03-12 04:28:39 24471 [Note] InnoDB: Initializing buffer pool, size = 64.0M
  67. InnoDB: mmap(68681728 bytes) failed; errno 12
  68. 2017-03-12 04:28:39 24471 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
  69. 2017-03-12 04:28:39 24471 [ERROR] Plugin 'InnoDB' init function returned error.
  70. 2017-03-12 04:28:39 24471 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  71. 2017-03-12 04:28:39 24471 [ERROR] Unknown/unsupported storage engine: InnoDB
  72. 2017-03-12 04:28:39 24471 [ERROR] Aborting
复制代码





再次感谢军哥。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-12 14:32:59 | 显示全部楼层



第二段是建中午的时候,疯狂的挂掉,重启之后,不超过5分钟一直挂,我把这部分的日志也截取出来:

  1. 170312 11:13:50 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZbp1h44q15c9j13hfqfdeZ.pid ended
  2. 170312 11:13:52 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
  3. 2017-03-12 11:13:52 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 32613 ...
  4. 2017-03-12 11:13:52 32613 [Note] Plugin 'FEDERATED' is disabled.
  5. 2017-03-12 11:13:52 32613 [Note] InnoDB: Using atomics to ref count buffer pool pages
  6. 2017-03-12 11:13:52 32613 [Note] InnoDB: The InnoDB memory heap is disabled
  7. 2017-03-12 11:13:52 32613 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  8. 2017-03-12 11:13:52 32613 [Note] InnoDB: Memory barrier is not used
  9. 2017-03-12 11:13:52 32613 [Note] InnoDB: Compressed tables use zlib 1.2.3
  10. 2017-03-12 11:13:52 32613 [Note] InnoDB: Using CPU crc32 instructions
  11. 2017-03-12 11:13:52 32613 [Note] InnoDB: Initializing buffer pool, size = 256.0M
  12. 2017-03-12 11:13:52 32613 [Note] InnoDB: Completed initialization of buffer pool
  13. 2017-03-12 11:13:52 32613 [Note] InnoDB: Highest supported file format is Barracuda.
  14. 2017-03-12 11:13:52 32613 [Note] InnoDB: 128 rollback segment(s) are active.
  15. 2017-03-12 11:13:52 32613 [Note] InnoDB: Waiting for purge to start
  16. 2017-03-12 11:13:52 32613 [Note] InnoDB: 5.6.29 started; log sequence number 1626350
  17. 2017-03-12 11:13:52 32613 [Note] Server hostname (bind-address): '*'; port: 3306
  18. 2017-03-12 11:13:52 32613 [Note] IPv6 is available.
  19. 2017-03-12 11:13:52 32613 [Note] - '::' resolves to '::';
  20. 2017-03-12 11:13:52 32613 [Note] Server socket created on IP: '::'.
  21. 2017-03-12 11:13:52 32613 [Note] Event Scheduler: Loaded 0 events
  22. 2017-03-12 11:13:52 32613 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
  23. Version: '5.6.29-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
  24. 2017-03-12 11:19:47 32613 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

  25. 2017-03-12 11:19:47 32613 [Note] Giving 0 client threads a chance to die gracefully
  26. 2017-03-12 11:19:47 32613 [Note] Event Scheduler: Purging the queue. 0 events
  27. 2017-03-12 11:19:47 32613 [Note] Shutting down slave threads
  28. 2017-03-12 11:19:47 32613 [Note] Forcefully disconnecting 0 remaining clients
  29. 2017-03-12 11:19:47 32613 [Note] Binlog end
  30. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'partition'
  31. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
  32. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'ARCHIVE'
  33. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
  34. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
  35. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
  36. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
  37. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
  38. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
  39. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
  40. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
  41. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
  42. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
  43. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
  44. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
  45. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
  46. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_FT_DELETED'
  47. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
  48. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_METRICS'
  49. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
  50. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
  51. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
  52. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
  53. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
  54. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
  55. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_CMPMEM'
  56. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_CMP_RESET'
  57. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_CMP'
  58. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
  59. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_LOCKS'
  60. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'INNODB_TRX'
  61. 2017-03-12 11:19:47 32613 [Note] Shutting down plugin 'InnoDB'
  62. 2017-03-12 11:19:47 32613 [Note] InnoDB: FTS optimize thread exiting.
  63. 2017-03-12 11:19:47 32613 [Note] InnoDB: Starting shutdown...
  64. 2017-03-12 11:19:48 32613 [Note] InnoDB: Shutdown completed; log sequence number 1626360
  65. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'BLACKHOLE'
  66. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'CSV'
  67. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'MyISAM'
  68. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'MRG_MYISAM'
  69. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'MEMORY'
  70. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'sha256_password'
  71. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'mysql_old_password'
  72. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'mysql_native_password'
  73. 2017-03-12 11:19:48 32613 [Note] Shutting down plugin 'binlog'
  74. 2017-03-12 11:19:48 32613 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

  75. 170312 11:19:48 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZbp1h44q15c9j13hfqfdeZ.pid ended
  76. 170312 11:19:51 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
  77. 2017-03-12 11:19:51 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 815 ...
  78. 2017-03-12 11:19:51 815 [Note] Plugin 'FEDERATED' is disabled.
  79. 2017-03-12 11:19:51 815 [Note] InnoDB: Using atomics to ref count buffer pool pages
  80. 2017-03-12 11:19:51 815 [Note] InnoDB: The InnoDB memory heap is disabled
  81. 2017-03-12 11:19:51 815 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  82. 2017-03-12 11:19:51 815 [Note] InnoDB: Memory barrier is not used
  83. 2017-03-12 11:19:51 815 [Note] InnoDB: Compressed tables use zlib 1.2.3
  84. 2017-03-12 11:19:51 815 [Note] InnoDB: Using CPU crc32 instructions
  85. 2017-03-12 11:19:51 815 [Note] InnoDB: Initializing buffer pool, size = 256.0M
  86. 2017-03-12 11:19:51 815 [Note] InnoDB: Completed initialization of buffer pool
  87. 2017-03-12 11:19:51 815 [Note] InnoDB: Highest supported file format is Barracuda.
  88. 2017-03-12 11:19:51 815 [Note] InnoDB: 128 rollback segment(s) are active.
  89. 2017-03-12 11:19:51 815 [Note] InnoDB: Waiting for purge to start
  90. 2017-03-12 11:19:51 815 [Note] InnoDB: 5.6.29 started; log sequence number 1626360
  91. 2017-03-12 11:19:51 815 [Note] Server hostname (bind-address): '*'; port: 3306
  92. 2017-03-12 11:19:51 815 [Note] IPv6 is available.
  93. 2017-03-12 11:19:51 815 [Note] - '::' resolves to '::';
  94. 2017-03-12 11:19:51 815 [Note] Server socket created on IP: '::'.
  95. 2017-03-12 11:19:51 815 [Note] Event Scheduler: Loaded 0 events
  96. 2017-03-12 11:19:51 815 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
  97. Version: '5.6.29-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
复制代码
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-3-13 11:15:36 | 显示全部楼层

InnoDB: mmap(68681728 bytes) failed; errno 12
2017-03-12 04:28:39 24471 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

内存可能不足了
你内存多大,建议把 innodb_buffer_pool_size 调小一些,再观察看看

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-3-13 14:56:37 | 显示全部楼层

主机的内存是2G,现在这里设置的是:256M.

调整到128或者64M ?
 楼主| 发表于 2017-3-13 15:02:07 | 显示全部楼层

军哥您好,另外一个阿里云的ECS,是2核4G内存的;

innodb_buffer_pool_size 之前设置的大小是:512M,也会导致数据库挂掉,但是不是很频繁,一般是1~2天才挂一次,是不是也要调整小一点,比如设置成256M ?

谢谢。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-13 15:05:39 | 显示全部楼层

另外,刚才查看了数据库编码,都是mysiam的,这样是不是可以关闭InnoDB这个数据库引擎?

谢谢。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-3-13 19:33:14 | 显示全部楼层

回复 7# 的帖子


2G的话设置128MB把,4G的256MB

mysql 5.6的话,编辑/etc/my.cnf
innodb=OFF
ignore-builtin-innodb
skip-innodb
default_storage_engine = MyISAM
default_tmp_storage_engine = MyISAM

将#loose-innodb 那些行前面的# 删掉
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-20 10:42:23 | 显示全部楼层



感谢军哥,这几天一直观察中,数据库没有再挂过,再次感谢军哥。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 09:49 , Processed in 0.029942 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表