Page 4 of 4

Re: Mysql crash after some hours even i have 8gb Ram

Posted: Mon Nov 23, 2015 7:02 pm
by Joop
I manage multiple website with infinitewp, maybe infinitewp is the problem. All the plugins I use are very popular so I don't think that's the problem, because other people should have the same problem. Which plugins do you use?

edit:

I don't no why but the problem is solved.

Re: Mysql crash after some hours even i have 8gb Ram

Posted: Sat Dec 05, 2015 8:27 pm
by .MP.
recently i have this problem too..
# 1GB ram VPS, CentOS 6.7 64bit
# Wordpress avg 2k visitor & 10k page view (increasing)
# MySQL Community 5.5.46

but after i disabled (suspend) MySQL port at firewall menu on VestaCP, the problem is decreasing alot.
but sometimes crash too, maybe around once/twice per month.

Re: Mysql crash after some hours even i have 8gb Ram

Posted: Sat Dec 05, 2015 9:18 pm
by tomer628
do you mean 3306,5432 ports ?

Re: Mysql crash after some hours even i have 8gb Ram

Posted: Sun Dec 06, 2015 6:39 pm
by .MP.
tomer628 wrote:do you mean 3306,5432 ports ?
yup.. this my VestaCP Firewall screenshot.

Image

Re: Mysql crash after some hours even i have 8gb Ram

Posted: Sun Dec 06, 2015 9:08 pm
by tomer628
in my case i just enabled "I'm Under Attack" in CloudFlare and all problems gone...
maybe someone (or group) try to down my website...
but as long this feature working my website good..
and if i disabled it problems returns...

Re: Mysql crash after some hours even i have 8gb Ram

Posted: Wed Dec 16, 2015 9:24 am
by .MP.
tomer628 wrote:in my case i just enabled "I'm Under Attack" in CloudFlare and all problems gone...
maybe someone (or group) try to down my website...
but as long this feature working my website good..
and if i disabled it problems returns...
for me, enabled "I'm Under Attack" in CloudFlare doesn't solve the real issue, because i'm not using CloudFlare.
now my mysql database crash often, because increasing visitor/pageviews i think.
now i try to play with httpd configuration, to limit memory usage.
i still learning how to optimize my vps, especially httpd/mysql configuration.

note:
# i'm still not upgrade my vps (1GB RAM), only 1 web on this vps

my httpd.conf

Code: Select all

Timeout 30
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 10

<IfModule prefork.c>
    StartServers       5
    MinSpareServers    5
    MaxSpareServers   10
    ServerLimit       50
    MaxClients        50
    MaxRequestsPerChild  1000
</IfModule>

<IfModule worker.c>
    StartServers         2
    MaxClients         200
    MinSpareThreads     25
    MaxSpareThreads     75
    ThreadsPerChild     25
    MaxRequestsPerChild  4000
</IfModule>

<IfModule itk.c>
    StartServers       8
    MinSpareServers    5
    MaxSpareServers   20
    ServerLimit      256
    MaxClients       256
    MaxRequestsPerChild  4000
</IfModule>
my my.cnf

Code: Select all

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=50
max_user_connections=30
wait_timeout=10
interactive_timeout=50
long_query_time=5
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log

performance_schema=off

key_buffer = 16M
max_allowed_packet = 8M
myisam_sort_buffer_size = 16M
join_buffer_size=1M
read_buffer_size=1M
sort_buffer_size=2M
table_cache=1024
thread_stack=192K
thread_cache_size=4
interactive_timeout=25
connect_timeout=5
max_allowed_packet=1M
max_connect_errors=1000
query_cache_limit=1M
query_cache_size=8M
query_cache_type=1
tmp_table_size=16M

#innodb_use_native_aio = 0
innodb_file_per_table


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid