imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Thinkbot,

/etc/init.d/mysql status
ERROR! MySQL is running but PID file could not be found

Mysql service not starting....


Thanks,
Imran Khan.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Thinkbot,

After changes server load is above 300. So I have reverted the changes and reboot the server and site is working fine.
So I am opening ticket in your Support for this issue.

Thanks,
Imran Khan.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Thinkbot,

I have made the below changes:-

For Mysql:-

my.cnf file setting:-
[mysqld]
skip-networking
innodb_file_per_table=1
wait_timeout = 30
connect_timeout = 1
local-infile=0

open_files_limit=25000
default-storage-engine=MyISAM

max_connections = 500
max_user_connections = 150

key_buffer_size = 5G
max_allowed_packet=20M

query_cache_size = 50M
query_cache_limit = 1M
tmp_table_size = 100M
max_heap_table_size = 100M
thread_cache_size=50
thread_cache = 128
table_open_cache = 1500
table_definition_cache = 1000

slow_query_log=1
slow_query_log_file=mysql-slow.log
long_query_time=0.1
log-queries-not-using-indexes

sort_buffer_size=256K
join_buffer_size=2M
read_rnd_buffer_size=4M

max_write_lock_count = 10
concurrent_insert=2

For Apache:-

Timeout 15
StartServers 20
MinSpareServers 10
MaxSpareServers 20
ServerLimit 500
MaxClients 500
MaxRequestsPerChild 10000
KeepAlive Off
KeepAliveTimeout 1
MaxKeepAliveRequests 150

And restarted the Apache and MySQL service.

Thanks,
Imran Khan.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Thinkbot,

Suddenly server load increasing from 6 to 300 and it was not accessible.
I have reverted the Apache setting as well. Now everything is working fine.

Thanks,
Imran Khan.
 

thinkbot

Well-Known Member
Oct 30, 2012
326
1
16
cPanel Access Level
Root Administrator
Well, you could have just restart mysql/apache/server
And things would get back to normal

In those kind of situations you should have checked what coused the spike, most likely some slow query locking the MyISAM tables, and since you got:
[!!] Table locks acquired immediately: 92%
this is the most possible option

and as I wrote way before, pt-query-digest
apache/mysql config was good, no need to restore it
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Thinkbot,

Thanks for your help. Now we are planning to setup the Lab server with same application and perform the Apache and MySQL optimization.
Please let me know, How we can migrate data from live Cpanel server to Lab server. Installed software list are as follows.

Installed Software in the live server:-
Cpanel, MySQL, Apache, dolphin 7,Exim, PHP, Perl and Dovecot.

Thanks,
Imran Khan.
 

thinkbot

Well-Known Member
Oct 30, 2012
326
1
16
cPanel Access Level
Root Administrator
About migration, you should create new topic in different category
There will be more people who can more precisely help with migration