Server load problem....is mysql? - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: System Setup & Installation (/forum-32.html) +--- Thread: Server load problem....is mysql? (/thread-7184.html) Pages: 1 2 |
Server load problem....is mysql? - adivor - 07-10-2009 07:11 AM Hello to all, i have a problem with one server, server load, but not in all cases. after server restart for 24-48H server load are up tu 1 with ~1000 users online in one forum and ~300 in other blog, forum, ecc... hosted in the same server. After 24-48H i see any mysql error (send in my mail from vbulletin script) and server load some times ~16-20. In this case my sites works slow and not in good situation . How is possible for example restart mysql after xxx hours or another best solution? thanks in advanced! RE: Server load problem....is mysql? - kurgans - 07-10-2009 07:24 AM You can mount Monit to monitor your server and set conditions for the service is restarted if the workload is very high http://www.howtoforge.com/server_monitoring_with_munin_monit_debian_etch_p2 It is a small example. if cpu is greater than 10% for 2 cycles then alert if cpu > 15% for 5 cycles then restart if totalmem > 500 MB for 5 cycles then restart if children > 250 then restart http://www.howtoforge.com/server_monitoring_with_munin_monit_debian_etch You can make a cron to restart the services RE: Server load problem....is mysql? - adivor - 07-10-2009 08:00 AM Thanks...i try this but is normal this problem in my server? All 2 script installed...i testing now RE: Server load problem....is mysql? - kilburn - 07-10-2009 03:06 PM Enable the mysql slow query log, because this is probably being caused by some slow querys or high impact procedure (like the ispcp virtual traffic script or something like this). Obviously, it is NOT normal unless you have 100% ram usage and the machine is heavily swapping to disk. RE: Server load problem....is mysql? - joximu - 07-10-2009 04:39 PM Hi adivor also check if mysql does a bin-log (log all insters/updates for a slave-server) - debian does this by default. /J RE: Server load problem....is mysql? - adivor - 07-10-2009 06:03 PM (07-10-2009 03:06 PM)kilburn Wrote: Enable the mysql slow query log Can you help me for this? i have server programmer in holiday. RE: Server load problem....is mysql? - joximu - 07-10-2009 06:15 PM Open /etc/mysql/my.cnf if you have a line log_bin = /var/log/mysql/mysql-bin.log write a # in front of it. but also comment the next lines: expire_logs_days and max_binlog_size then restart the mysql service. /J RE: Server load problem....is mysql? - adivor - 07-10-2009 06:40 PM Olready with # this line: expire_logs_days and max_binlog_size ADDING # for lines expire_logs_days and max_binlog_size under you can see original my.conf Code: # RE: Server load problem....is mysql? - joximu - 07-10-2009 07:32 PM ok, so log-bin was already off (I had a message to also comment the other lines - but maybe it's not neccesarry). Hm - so, the other approach is: log the "slow" queries. log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 2 and maybe: log-queries-not-using-indexes This can help find the scripts that should be optimized... You also can have a look in phpMyAdmin, Status... there are also some interesting numbers... /J RE: Server load problem....is mysql? - adivor - 07-10-2009 07:41 PM (07-10-2009 07:32 PM)joximu Wrote: Hm - so, the other approach is: log the "slow" queries. I set this, how many time is necessary? update: i see this log but i see my mysql password and i can't publish it. what line are you interested? update2: i'm very confused....i use only vbulletin and wordpress, not "crazy" script.... vb and wp are fully optimized with cache system.....confused... |