您好我遇到了mysql问题。我搬到新的Droplet同样的移民。但今天我在第一个网站遇到了这个问题:
http://i.imgur.com/YJ87wSV.png
在我的第二个网站中,有时它会将我重定向到wp-admin / install并在该页面上给出错误太多directs.Another问题mysql停止没有任何错误。我重新启动mysql后,这些问题修复了,但之后仍然会发生。我不知道是什么导致这个。我需要重新启动mysql,以解决这些问题,但这不是一个解决方案。大约1小时后仍然出现同样的问题。
我在数字海洋的vps 5 $ plan.1 cpu,512 mb ram,centos 6.5,apache,mysql,nginx,cpanel.Just中有2个wordpress网站。请帮我永久解决这个问题。
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
答案 0 :(得分:1)
具有半千兆字节RAM的微型虚拟机根本不足以处理MySQL守护程序和Web服务器。您需要在VM中获得更多RAM,或者拆分Web服务器和MySQL服务器。
许多每月5美元的共享主机方案提供了一个独立的,共享的MySQL服务器,并且工作得非常好。
答案 1 :(得分:0)
有一个需要INNODB的插件。启用它。此链接可以帮助How to enable INNODB in mysql
答案 2 :(得分:0)
如果您查阅服务器日志,很可能会看到MySQL被OOM(内存不足)管理器杀死。这很可能发生,因为在任何负载下,Apache都会启动子进程。您最好的短期解决方案可能会限制Apache工作人员的数量。您最好的长期解决方案是在具有足够RAM的服务器上运行,以便两个系统都能够处理您遇到的负载。