【发布时间】:2014-08-17 16:36:00
【问题描述】:
您好,我遇到了 mysql 问题。我已移至具有相同配置的新 droplet。但今天我在第一个站点遇到了这个问题:
http://i.imgur.com/YJ87wSV.png
在我的第二个站点中,有时它会将我重定向到 wp-admin/install 并在该页面上给出错误太多的指示。另一个问题 mysql 停止没有任何错误。在我重新启动 mysql 后,这些问题修复为 while ,但在那之后仍然发生。我不知道是什么原因造成的。我需要重新启动 mysql 来解决这些问题,但这不是解决方案。大约 1 2 小时后仍然出现同样的问题。
我在数字海洋的 vps 5$ plan.1 cpu , 512 mb ram , centos 6.5 , apache , mysql , nginx, cpanel.Just 2 wordpress sites in it. 请帮我永久解决这个问题。
etc/my.conf
[mysqld]
default-storage-engine=MyISAM
innodb_file_per_table=1
innodb_buffer_pool_size=60817408
max_allowed_packet=268435456
我的 htop ss:http://i.imgur.com/tyzzbFn.png
MySQL Version 5.5.37-cll x86_64
Uptime = 0 days 0 hrs 0 min 6 sec
Avg. qps = 2
Total Questions = 15
Threads Connected = 1
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service
SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10.000000 sec.
You have 0 out of 36 that take longer than 10.000000 sec. to complete
Your long_query_time seems to be fine
BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.5/en/point-in-time-recovery.html
WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 1
Historic threads_per_sec = 3
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size
MAX CONNECTIONS
Current max_connections = 300
Current threads_connected = 1
Historic max_used_connections = 1
The number of used connections is 0% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating
INNODB STATUS
Current InnoDB index space = 4 M
Current InnoDB data space = 3 M
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 16 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory
MEMORY USAGE
Max Memory Ever Allocated : 42 M
Configured Max Per-thread Buffers : 825 M
Configured Max Global Buffers : 40 M
Configured Max Memory Limit : 865 M
Physical Memory : 490 M
Max memory limit exceeds 90% of physical memory
KEY BUFFER
No key reads?!
Seriously look into using some indexes
Current MyISAM index space = 393 K
Current key_buffer_size = 8 M
Key cache miss rate is 1 : 0
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine
QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size
SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
No sort operations have been performed
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 132.00 K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
OPEN FILES LIMIT
Current open_files_limit = 4096 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine
TABLE CACHE
Current table_open_cache = 400 tables
Current table_definition_cache = 400 tables
You have a total of 234 tables
You have 234 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 279 temp tables, 11% were created on disk
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 10 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 0 : 294
Your table locking seems to be fine
【问题讨论】:
-
除了 php 错误日志之外,您是否有要检查的 mysql 错误日志?似乎有些东西正在停用 innodb 存储引擎,但 wordpress 并不真的需要 innodb,所以我最好的猜测是 Sabai 框架正在超载您的 mysql 服务。你确定你有 innodb 引擎在运行吗?您可以在 phpmyadmin 或控制台中使用
show engines命令验证这一点。 -
我不久前禁用并删除了该插件。但仍然出现错误。MySQL 出现故障。
-
好的,show engine 命令怎么样?你能监控mysql中打开了多少个连接吗?
-
这里是mysql显示引擎输出prntscr.com/4dqo1x
-
好吧,你没有运行 innodb,所以你可能想从你的 my.conf 中注释 innodb 参数。您确定 sambai 插件已正确禁用和删除吗?你能确认它没有留下自定义表格吗?