Reputation: 11
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 :
https://i.sstatic.net/W2Pty.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.
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.
etc/my.conf
[mysqld]
default-storage-engine=MyISAM
innodb_file_per_table=1
innodb_buffer_pool_size=60817408
max_allowed_packet=268435456
My htop ss : https://i.sstatic.net/JAMNC.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
Upvotes: 0
Views: 655
Reputation: 180014
If you consult your servers logs, chances are you'll see MySQL getting killed by the OOM (out of memory) manager. This is likely happening because, under any sort of load, Apache is firing up child processes. Your best short-term solution is likely limiting the number of Apache workers. Your best long-term solution is running on a server with enough RAM for both systems to handle the load you're encountering.
Upvotes: 0
Reputation: 108651
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. You need to get more RAM in your VM or split your web server and your MySQL server.
Many $5 / month shared hosting plans offer a separate, shared, MySQL server, and work beautifully.
Upvotes: 1
Reputation: 138
There's a plugin that requires INNODB. Enable it. This link can help How to enable INNODB in mysql
Upvotes: 0