70 Sites And Mysql connection error sometime

kenhirai
Posts: 330
Joined: Wed Jan 02, 2013 4:25 am

Re: 70 Sites And Mysql connection error sometime

Post by kenhirai »

Just reading the meter from panel. and I see all my sites are down.

Can u tell me how to optimize those Cron and Rot.php so that they dont run every minute and still get an accurate stats for the script?

thank u this is very important
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: 70 Sites And Mysql connection error sometime

Post by admin »

You have to tube mysql first
but you didnt answer how your tech guy measures load ...
Don't forget to run script update
kenhirai
Posts: 330
Joined: Wed Jan 02, 2013 4:25 am

Re: 70 Sites And Mysql connection error sometime

Post by kenhirai »

Thats what they told me already. Using Metric and Server Is Down when too much connections going on. I am splitting to another server just for Smart CJ MYSQL accounts. This is what they said. I have 200 copies of SmartCj, each of those Cron.php and Rot.php running every minute, it costs alot of overload to Harddisk, then it crashed the mysql for too much connections.

I am also using Trade Expert and Trade Pulse, they have unique system to line up those cron so that they excecute in quere, not together same time, and still have accurate stats. Is there a way to tune stuff like that? U mention about MYSQL tuning, briefly tell me how to tune it, and then how to tune cron to get the best result. U know much more than other people, please share.
kenhirai
Posts: 330
Joined: Wed Jan 02, 2013 4:25 am

Re: 70 Sites And Mysql connection error sometime

Post by kenhirai »

Also note that, when I disable all 200 copies of Smart CJ Cron And Rot.php, The server went back to normal and low load, I am sure the problem is CRON being execute same time when u have too many sites.
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: 70 Sites And Mysql connection error sometime

Post by admin »

Did you setup crontab file like here ?

http://smartcj.com/wiki/doku.php?id=cro ... one_server
Don't forget to run script update
kenhirai
Posts: 330
Joined: Wed Jan 02, 2013 4:25 am

Re: 70 Sites And Mysql connection error sometime

Post by kenhirai »

hello perfect this is exactly what i was looking for!!!

let say I have 200 sites, how do I setup the cron for those many tasks under 1 minute???

cd /path_to_scj/bin/; env HTTP_HOST=yourdomain.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 2
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &

???

Also, what about rot.php, do I setup the same sleep function for that cron?
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: 70 Sites And Mysql connection error sometime

Post by admin »

cd /path_to_scj/bin/; env HTTP_HOST=yourdomain.com /path_to_php/php -q cron.php &
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 1
cd /path_to_scj/bin/; env HTTP_HOST=yourdomain.com /path_to_php/php -q cron.php &
cd /path_to_scj2/bin/; env HTTP_HOST=yourdomain2.com /path_to_php/php -q cron.php &
sleep 1


and the same way for rot.php (another file)
Don't forget to run script update
kenhirai
Posts: 330
Joined: Wed Jan 02, 2013 4:25 am

Re: 70 Sites And Mysql connection error sometime

Post by kenhirai »

also, can u post the mysql tuning for English version too?
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: 70 Sites And Mysql connection error sometime

Post by admin »

Don't forget to run script update
kenhirai
Posts: 330
Joined: Wed Jan 02, 2013 4:25 am

Re: 70 Sites And Mysql connection error sometime

Post by kenhirai »

also please add this tutor in english

Hints
Optimal Settings
New Rotation Perfomance

thx
Post Reply