求解,mysql过段时间就死掉,内存2Gmysql数据库怎么用会提示这个

V3版本mysql经常自动休克的临时解决办法
V3版经常休克,有时候两三天一次,或者一天一次,甚至几个小时一次,相当相当烦,这个问题非常普遍了。估计只有极少数网站是正常的。
也许增加内存会有改善,但我感觉跟内存关系不大,因为我的搬瓦工内存才512M,半个月了,从来没挂过。linode是2G内存,几乎每天挂掉一次,甚至一天挂三次,都快疯了。后来把虚拟内存增加了,貌似就好了。
linode增加虚拟内存的方法:先关闭服务器,再把硬盘尺寸减小,然后把减出来的空间加到虚拟内存上,重启服务器。我的虚拟内存原来是默认的256M,现在是2.5G。
另外,如果有一些IP段恶意访问大量页面,可能内存没耗光,CPU也没升高,但其实已经差不多了,mysql就很容易死掉,赶紧把恶意IP封掉。
大家可以试下,也许能临时解决问题。
反正就是感觉V3相当娇弱,一点风浪就死。
这个跟v3没有一点点关联,v3只是集成了那些软件版本?具体的问题都是系统与版本间的问题或冲突,或配置等
看清提问三步曲及多看教程/FAQ索引(,,,),益处多多.
从调整虚拟内存后,一直没挂过了
求教楼主,怎么增加虚拟内存?详细点,按照网上的教程添加没成功。。。。。。
& & 都讲那么清楚了啊,你不看帖?
20多天没休克过了
一样的问题 sql老是自动挂了 汗
本帖最后由 aleyy 于
22:13 编辑
按照LZ说的,我增加了512内存的主机交换内存1G,目前暂时还好,看来是数据库5.5和5.6新版引擎innodb的问题:占用内存高,小内存必须启用虚拟内存。
另:可以再优化下系统,包括my.cnf和php.ini相关参数。
有遇到 CentOs 7.X 安装WDCP V3 安装好后 ,重启LINUX ,遇到MYSQL出错的问题& &这个管理有测试过吗?我用的是阿里云 centos 7.X
www.eit0571.com,hzgxr.com
我也是这问题。。。:(
能详细点吗
[通过 QQ、MSN 分享给朋友]您还没有登录,快捷通道只有在登录后才能使用。 还没有帐号? 赶紧
求解,mysql过段时间就死掉,内存2G怎么会提示这个呢?
在线时间0小时
InnoDB: Doing recovery: scanned up to log sequence number :18:21&&InnoDB: Starting an apply batch of log records to the database...InnoDB: Progress in percents: 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 completedInnoDB: Last MySQL binlog file position 0 445221, file name ./mysql-bin.000090:18:21&&InnoDB: Waiting for the background threads to start:18:22 InnoDB: 5.5.37 log sequence number :18:22 [Note] Recovering after a crash using mysql-bin:18:22 [Note] Starting crash recovery...:18:22 [Note] Crash recovery finished.:18:22 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306:18:22 [Note]&& - '0.0.0.0' resolves to '0.0.0.0';:18:22 [Note] Server socket created on IP: '0.0.0.0'.:18:23 [Note] Event Scheduler: Loaded 0 events:18:23 [Note] /alidata/server/mysql/bin/mysqld: ready for connections.Version: '5.5.37-log'&&socket: '/tmp/mysql.sock'&&port: 3306&&MySQL Community Server (GPL):23:28 mysqld_safe Number of processes running now: 0:23:28 mysqld_safe mysqld restarted:23:29 [Note] Plugin 'FEDERATED' is disabled.:23:29 InnoDB: The InnoDB memory heap is disabled:23:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins:23:29 InnoDB: Compressed tables use zlib 1.2.3:23:29 InnoDB: Using Linux native AIO:23:29 InnoDB: Initializing buffer pool, size = 8.0M:23:29 InnoDB: Completed initialization of buffer pool:23:35 InnoDB: highest supported file format is Barracuda.InnoDB: Log scan progressed past the checkpoint lsn :23:36&&InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...InnoDB: Restoring possible half-written data pages from the doublewriteInnoDB: buffer...InnoDB: Doing recovery: scanned up to log sequence number :23:42&&InnoDB: Starting an apply batch of log records to the database...InnoDB: Progress in percents: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 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 completedInnoDB: Last MySQL binlog file position 0 626337, file name ./mysql-bin.000091:23:42&&InnoDB: Waiting for the background threads to start:23:43 InnoDB: 5.5.37 log sequence number :23:43 [Note] Recovering after a crash using mysql-bin:23:43 [Note] Starting crash recovery...:23:43 [Note] Crash recovery finished.:23:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306:23:43 [Note]&& - '0.0.0.0' resolves to '0.0.0.0';:23:43 [Note] Server socket created on IP: '0.0.0.0'.:23:44 [Note] Event Scheduler: Loaded 0 events:23:44 [Note] /alidata/server/mysql/bin/mysqld: ready for connections.Version: '5.5.37-log'&&socket: '/tmp/mysql.sock'&&port: 3306&&MySQL Community Server (GPL):37:44 mysqld_safe Starting mysqld daemon with databases from /alidata/server/mysql/data:37:44 [Note] Plugin 'FEDERATED' is disabled.:37:44 InnoDB: The InnoDB memory heap is disabled:37:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins:37:44 InnoDB: Compressed tables use zlib 1.2.3:37:44 InnoDB: Using Linux native AIO:37:44 InnoDB: Initializing buffer pool, size = 8.0M:37:44 InnoDB: Completed initialization of buffer pool:37:44 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!:37:45&&InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...InnoDB: Restoring possible half-written data pages from the doublewriteInnoDB: buffer...InnoDB: Last MySQL binlog file position 0 2926, file name ./mysql-bin.000092:37:45&&InnoDB: Waiting for the background threads to start:37:46 InnoDB: 5.5.37 log sequence number :37:46 [Note] Recovering after a crash using mysql-bin:37:46 [Note] Starting crash recovery...:37:46 [Note] Crash recovery finished.:37:46 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306:37:46 [Note]&& - '0.0.0.0' resolves to '0.0.0.0';:37:46 [Note] Server socket created on IP: '0.0.0.0'.:37:46 [Note] Event Scheduler: Loaded 0 events:37:46 [Note] /alidata/server/mysql/bin/mysqld: ready for connections.Version: '5.5.37-log'&&socket: '/tmp/mysql.sock'&&port: 3306&&MySQL Community Server (GPL)mysql 配置# Example MySQL config file for medium systems.## This is for a system with little memory (32M - 64M) where MySQL plays# an important part, or systems up to innodb_buffer_pool_sizeM where MySQL is used together with# other programs (such as a web server)## MySQL programs look for option files in a set of# locations which depend on the deployment platform.# You can copy this option file to one of those# locations. For information about these locations, see:# http://dev.mysql.com/doc/mysql/en/option-files.html## In this file, you can use all long options that a program supports.# If you want to know which options a program supports, run the program# with the &--help& option.# The following options will be passed to all MySQL clients[client]#password&&&&= your_passwordport&&&&&&&&= 3306socket&&&&&&&&= /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL server[mysqld]port&&&&&&&&= 3306socket&&&&&&&&= /tmp/mysql.sockskip-external-lockinglog-error=/alidata/log/mysql/error.logkey_buffer_size = 16Mmax_allowed_packet = 1Mtable_open_cache = 64sort_buffer_size = 512Knet_buffer_length = 8Kread_buffer_size = 256Kread_rnd_buffer_size = 512Kmyisam_sort_buffer_size = 8Minnodb_buffer_pool_size = 8M# Don't listen on a TCP/IP port at all. This can be a security enhancement,# if all processes that need to connect to mysqld run on the same host.# All interaction with mysqld must be made via Unix sockets or named pipes.# Note that using this option without enabling named pipes on Windows# (via the &enable-named-pipe& option) will render mysqld useless!# #skip-networking# Replication Master Server (default)# binary logging is required for replicationlog-bin=mysql-bin# binary logging format - mixed recommendedbinlog_format=mixed# required unique id between 1 and 2^32 - 1# defaults to 1 if master-host is not set# but will not function as a master if omittedserver-id&&&&= 1# Replication Slave (comment out master section to use this)## To configure this host as a replication slave, you can choose between# two methods :## 1) Use the CHANGE MASTER TO command (fully described in our manual) -#&&&&the syntax is:##&&&&CHANGE MASTER TO MASTER_HOST=&host&, MASTER_PORT=&port&,#&&&&MASTER_USER=&user&, MASTER_PASSWORD=&password& ;##&&&&where you replace &host&, &user&, &password& by quoted strings and#&&&&&port& by the master's port number (3306 by default).##&&&&Example:##&&&&CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,#&&&&MASTER_USER='joe', MASTER_PASSWORD='secret';## OR## 2) Set the variables below. However, in case you choose this method, then#&&&&start replication for the first time (even unsuccessfully, for example#&&&&if you mistyped the password in master-password and the slave fails to#&&&&connect), the slave will create a master.info file, and any later#&&&&change in this file to the variables' values below will be ignored and#&&&&overridden by the content of the master.info file, unless you shutdown#&&&&the slave server, delete master.info and restart the slaver server.#&&&&For that reason, you may want to leave the lines below untouched#&&&&(commented) and instead use CHANGE MASTER TO (see above)## required unique id between 2 and 2^32 - 1# (and different from the master)# defaults to 2 if master-host is set# but will not function as a slave if omitted#server-id&&&&&& = 2## The replication master for this slave - required#master-host&&&& =&& &hostname&## The username the slave will use for authentication when connecting# to the master - required#master-user&&&& =&& &username&## The password the slave will authenticate with when connecting to# the master - required#master-password =&& &password&## The port the master is listening on.# optional - defaults to 3306#master-port&&&& =&&&port&## binary logging - not required for slaves, but recommended#log-bin=mysql-bin# Uncomment the following if you are using InnoDB tables#innodb_data_home_dir = /usr/local/mysql/data#innodb_data_file_path = ibdata1:10M:autoextend#innodb_log_group_home_dir = /usr/local/mysql/data# You can set .._buffer_pool_size up to 50 - 80 %# of RAM but beware of setting memory usage too high#innodb_buffer_pool_size = 16M#innodb_additional_mem_pool_size = 2M# Set .._log_file_size to 25 % of buffer pool size#innodb_log_file_size = 5M#innodb_log_buffer_size = 8M#innodb_flush_log_at_trx_commit = 1#innodb_lock_wait_timeout = 50[mysqldump]quickmax_allowed_packet = 16M[mysql]no-auto-rehash# Remove the next comment character if you are not familiar with SQL#safe-updates[myisamchk]key_buffer_size = 20Msort_buffer_size = 20Mread_buffer = 2Mwrite_buffer = 2M[mysqlhotcopy]interactive-timeout&&&
在线时间1521小时
在线时间955小时
推荐用户使用RDS吧
访问内容超出本站范围,不能确定是否安全
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
您目前还是游客,请
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
&回复后跳转到最后一页您还没有登录,快捷通道只有在登录后才能使用。 还没有帐号? 赶紧
求解,mysql过段时间就死掉,内存2G怎么会提示这个呢?
在线时间0小时
InnoDB: Doing recovery: scanned up to log sequence number :18:21&&InnoDB: Starting an apply batch of log records to the database...InnoDB: Progress in percents: 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 completedInnoDB: Last MySQL binlog file position 0 445221, file name ./mysql-bin.000090:18:21&&InnoDB: Waiting for the background threads to start:18:22 InnoDB: 5.5.37 log sequence number :18:22 [Note] Recovering after a crash using mysql-bin:18:22 [Note] Starting crash recovery...:18:22 [Note] Crash recovery finished.:18:22 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306:18:22 [Note]&& - '0.0.0.0' resolves to '0.0.0.0';:18:22 [Note] Server socket created on IP: '0.0.0.0'.:18:23 [Note] Event Scheduler: Loaded 0 events:18:23 [Note] /alidata/server/mysql/bin/mysqld: ready for connections.Version: '5.5.37-log'&&socket: '/tmp/mysql.sock'&&port: 3306&&MySQL Community Server (GPL):23:28 mysqld_safe Number of processes running now: 0:23:28 mysqld_safe mysqld restarted:23:29 [Note] Plugin 'FEDERATED' is disabled.:23:29 InnoDB: The InnoDB memory heap is disabled:23:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins:23:29 InnoDB: Compressed tables use zlib 1.2.3:23:29 InnoDB: Using Linux native AIO:23:29 InnoDB: Initializing buffer pool, size = 8.0M:23:29 InnoDB: Completed initialization of buffer pool:23:35 InnoDB: highest supported file format is Barracuda.InnoDB: Log scan progressed past the checkpoint lsn :23:36&&InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...InnoDB: Restoring possible half-written data pages from the doublewriteInnoDB: buffer...InnoDB: Doing recovery: scanned up to log sequence number :23:42&&InnoDB: Starting an apply batch of log records to the database...InnoDB: Progress in percents: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 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 completedInnoDB: Last MySQL binlog file position 0 626337, file name ./mysql-bin.000091:23:42&&InnoDB: Waiting for the background threads to start:23:43 InnoDB: 5.5.37 log sequence number :23:43 [Note] Recovering after a crash using mysql-bin:23:43 [Note] Starting crash recovery...:23:43 [Note] Crash recovery finished.:23:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306:23:43 [Note]&& - '0.0.0.0' resolves to '0.0.0.0';:23:43 [Note] Server socket created on IP: '0.0.0.0'.:23:44 [Note] Event Scheduler: Loaded 0 events:23:44 [Note] /alidata/server/mysql/bin/mysqld: ready for connections.Version: '5.5.37-log'&&socket: '/tmp/mysql.sock'&&port: 3306&&MySQL Community Server (GPL):37:44 mysqld_safe Starting mysqld daemon with databases from /alidata/server/mysql/data:37:44 [Note] Plugin 'FEDERATED' is disabled.:37:44 InnoDB: The InnoDB memory heap is disabled:37:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins:37:44 InnoDB: Compressed tables use zlib 1.2.3:37:44 InnoDB: Using Linux native AIO:37:44 InnoDB: Initializing buffer pool, size = 8.0M:37:44 InnoDB: Completed initialization of buffer pool:37:44 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!:37:45&&InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...InnoDB: Restoring possible half-written data pages from the doublewriteInnoDB: buffer...InnoDB: Last MySQL binlog file position 0 2926, file name ./mysql-bin.000092:37:45&&InnoDB: Waiting for the background threads to start:37:46 InnoDB: 5.5.37 log sequence number :37:46 [Note] Recovering after a crash using mysql-bin:37:46 [Note] Starting crash recovery...:37:46 [Note] Crash recovery finished.:37:46 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306:37:46 [Note]&& - '0.0.0.0' resolves to '0.0.0.0';:37:46 [Note] Server socket created on IP: '0.0.0.0'.:37:46 [Note] Event Scheduler: Loaded 0 events:37:46 [Note] /alidata/server/mysql/bin/mysqld: ready for connections.Version: '5.5.37-log'&&socket: '/tmp/mysql.sock'&&port: 3306&&MySQL Community Server (GPL)mysql 配置# Example MySQL config file for medium systems.## This is for a system with little memory (32M - 64M) where MySQL plays# an important part, or systems up to innodb_buffer_pool_sizeM where MySQL is used together with# other programs (such as a web server)## MySQL programs look for option files in a set of# locations which depend on the deployment platform.# You can copy this option file to one of those# locations. For information about these locations, see:# http://dev.mysql.com/doc/mysql/en/option-files.html## In this file, you can use all long options that a program supports.# If you want to know which options a program supports, run the program# with the &--help& option.# The following options will be passed to all MySQL clients[client]#password&&&&= your_passwordport&&&&&&&&= 3306socket&&&&&&&&= /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL server[mysqld]port&&&&&&&&= 3306socket&&&&&&&&= /tmp/mysql.sockskip-external-lockinglog-error=/alidata/log/mysql/error.logkey_buffer_size = 16Mmax_allowed_packet = 1Mtable_open_cache = 64sort_buffer_size = 512Knet_buffer_length = 8Kread_buffer_size = 256Kread_rnd_buffer_size = 512Kmyisam_sort_buffer_size = 8Minnodb_buffer_pool_size = 8M# Don't listen on a TCP/IP port at all. This can be a security enhancement,# if all processes that need to connect to mysqld run on the same host.# All interaction with mysqld must be made via Unix sockets or named pipes.# Note that using this option without enabling named pipes on Windows# (via the &enable-named-pipe& option) will render mysqld useless!# #skip-networking# Replication Master Server (default)# binary logging is required for replicationlog-bin=mysql-bin# binary logging format - mixed recommendedbinlog_format=mixed# required unique id between 1 and 2^32 - 1# defaults to 1 if master-host is not set# but will not function as a master if omittedserver-id&&&&= 1# Replication Slave (comment out master section to use this)## To configure this host as a replication slave, you can choose between# two methods :## 1) Use the CHANGE MASTER TO command (fully described in our manual) -#&&&&the syntax is:##&&&&CHANGE MASTER TO MASTER_HOST=&host&, MASTER_PORT=&port&,#&&&&MASTER_USER=&user&, MASTER_PASSWORD=&password& ;##&&&&where you replace &host&, &user&, &password& by quoted strings and#&&&&&port& by the master's port number (3306 by default).##&&&&Example:##&&&&CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,#&&&&MASTER_USER='joe', MASTER_PASSWORD='secret';## OR## 2) Set the variables below. However, in case you choose this method, then#&&&&start replication for the first time (even unsuccessfully, for example#&&&&if you mistyped the password in master-password and the slave fails to#&&&&connect), the slave will create a master.info file, and any later#&&&&change in this file to the variables' values below will be ignored and#&&&&overridden by the content of the master.info file, unless you shutdown#&&&&the slave server, delete master.info and restart the slaver server.#&&&&For that reason, you may want to leave the lines below untouched#&&&&(commented) and instead use CHANGE MASTER TO (see above)## required unique id between 2 and 2^32 - 1# (and different from the master)# defaults to 2 if master-host is set# but will not function as a slave if omitted#server-id&&&&&& = 2## The replication master for this slave - required#master-host&&&& =&& &hostname&## The username the slave will use for authentication when connecting# to the master - required#master-user&&&& =&& &username&## The password the slave will authenticate with when connecting to# the master - required#master-password =&& &password&## The port the master is listening on.# optional - defaults to 3306#master-port&&&& =&&&port&## binary logging - not required for slaves, but recommended#log-bin=mysql-bin# Uncomment the following if you are using InnoDB tables#innodb_data_home_dir = /usr/local/mysql/data#innodb_data_file_path = ibdata1:10M:autoextend#innodb_log_group_home_dir = /usr/local/mysql/data# You can set .._buffer_pool_size up to 50 - 80 %# of RAM but beware of setting memory usage too high#innodb_buffer_pool_size = 16M#innodb_additional_mem_pool_size = 2M# Set .._log_file_size to 25 % of buffer pool size#innodb_log_file_size = 5M#innodb_log_buffer_size = 8M#innodb_flush_log_at_trx_commit = 1#innodb_lock_wait_timeout = 50[mysqldump]quickmax_allowed_packet = 16M[mysql]no-auto-rehash# Remove the next comment character if you are not familiar with SQL#safe-updates[myisamchk]key_buffer_size = 20Msort_buffer_size = 20Mread_buffer = 2Mwrite_buffer = 2M[mysqlhotcopy]interactive-timeout&&&
在线时间1521小时
在线时间955小时
推荐用户使用RDS吧
访问内容超出本站范围,不能确定是否安全
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
您目前还是游客,请
验证问题: 59 + 36 = ?
&回复后跳转到最后一页

我要回帖

更多关于 mysql数据库命令大全 的文章

 

随机推荐