简体   繁体   English

Mysql在我的Vps上停止

[英]Mysql Stopping on My Vps

Hello I am having trouble mysql.I moved to new droplet with same configration.But today I am having this problem in my 1st site : 您好,我遇到了mysql问题。我移到了具有相同配置的新Droplet。但是今天,我在第一个站点中遇到了这个问题:

http://i.imgur.com/YJ87wSV.png http://i.imgur.com/YJ87wSV.png

In my 2nd site , sometimes it redirect me to wp-admin/install and give error at that page too many directs.Another problem mysql stopping without any error.After I restart mysql , these problem fixing as while , but after that still occurs.I don't have any idea what causing to this.I needed to restart mysql , for fixing these problems but it is not a solution.After about 1 2 hours still same problem occurrs. 在我的第二个站点中,有时它会将我重定向到wp-admin / install并在该页面上给出太多指示错误。另一个问题是mysql停止运行而没有任何错误。重新启动mysql之后,这些问题在while时修复,但此后仍然发生。我不知道是什么原因造成的。我需要重新启动mysql,以解决这些问题,但这不是解决方案。大约1 2小时后仍然发生同样的问题。

My vps at digital ocean 5$ plan.1 cpu , 512 mb ram , centos 6.5 , apache , mysql , nginx, cpanel.Just 2 wordpress sites in it.Please help me to fix this problem permanently. 我在Digital Ocean 5 $ plan.1 cpu,512 mb ram,centos 6.5,apache,mysql,nginx,cpanel的vps。仅其中两个wordpress网站。请帮助我永久解决此问题。

etc/my.conf 等/ my.conf

[mysqld]
default-storage-engine=MyISAM
innodb_file_per_table=1
innodb_buffer_pool_size=60817408
max_allowed_packet=268435456

My htop ss : http://i.imgur.com/tyzzbFn.png 我的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

A micro virtual machine with half a gigabyte of RAM is simply not big enough to handle both the MySQL daemon and a web server. 具有一半GB RAM的微型虚拟机根本不足以容纳MySQL守护程序和Web服务器。 You need to get more RAM in your VM or split your web server and your MySQL server. 您需要在VM中获得更多RAM或拆分Web服务器和MySQL服务器。

Many $5 / month shared hosting plans offer a separate, shared, MySQL server, and work beautifully. 许多每月$ 5的共享托管计划提供了一个单独的共享MySQL服务器,并且运行良好。

There's a plugin that requires INNODB. 有一个需要INNODB的插件。 Enable it. 启用它。 This link can help How to enable INNODB in mysql 该链接可以帮助如何在MySQL中启用INNODB

If you consult your servers logs, chances are you'll see MySQL getting killed by the OOM (out of memory) manager. 如果查阅服务器日志,则很有可能会看到MySQL被OOM(内存不足)管理器杀死。 This is likely happening because, under any sort of load, Apache is firing up child processes. 之所以可能发生这种情况,是因为在任何负载下,Apache都会启动子进程。 Your best short-term solution is likely limiting the number of Apache workers. 您最好的短期解决方案可能是限制Apache工人的数量。 Your best long-term solution is running on a server with enough RAM for both systems to handle the load you're encountering. 最好的长期解决方案是在具有足够RAM的服务器上运行,以使两个系统都能处理您遇到的负载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM