Portal Home > Knowledgebase > Articles Database > Monitoring / Logging the high load ?


Monitoring / Logging the high load ?




Posted by y0us3f, 06-29-2011, 08:57 PM
Hey guys , my MySQL Service hangs because of high loads and i think its an attack or something how can I log the load ? and see what's causing it ? i see the PIDs are too many , on Httpd and MySQLd sometimes this happens 2 - 3 days in a row , but now it didn't happen for a long time .. and today it happened. i keep restarting httpd and mysqld to keep the site running ... and get the PIDs back to normal

Posted by cptechie, 06-30-2011, 01:49 AM
Hello, The command top and its switches are very helpful in load monitoring. Also check whether mysql is optimized or not.

Posted by y0us3f, 06-30-2011, 09:39 AM
Hey thanks for your reply , the command top is a good way yeh for monitoring , but How can I know if its an attack or not ? it was fine for more than a week and now suddenly this happened , i restart the whole server , it stays for 2 mins then hangs again and too many PIDs so I stopped httpd and mysqld for and hour or 2 .. then started them again .. it works fine now and stable and I optimized mysqld before

Posted by CI-Andrew, 06-30-2011, 03:01 PM
Something else which is extremely helpful in tracking down the causes of issues like this is to enable slow query logging in mysql. When a query takes longer than X number of seconds it will be logged and you can then track down the problem.

Posted by quad3datwork, 06-30-2011, 03:08 PM
You can run following to see number of concurrent connections per unique IP. You done any Apache optimizations as well? So when you ran 'top'.... what shows? If you can capture a screenshot for everyone to see, it will be helpful.

Posted by y0us3f, 06-30-2011, 03:48 PM
Hey thanks all , CI-Andrew : how can i do that ? quad3datwork : there you go , it keeps changing (the top) http://5lejna.net/up/uploads/5lejna_13094628091.jpg ---------------- and about the apache optimizations yeh i did , i saw a tutorial before and i added these "--with-mpm=worker" \ --with-mpm=worker

Posted by netmultiple, 07-01-2011, 04:02 AM
Did you try Munin?

Posted by y0us3f, 07-01-2011, 06:31 AM
What's Munin ? sry im a beginner

Posted by The Brain, 07-01-2011, 10:23 PM
Munin is a monitoring tool. It can be found @ munin-monitoring.org

Posted by netmultiple, 07-02-2011, 07:20 AM
Munin is tracking server usage tool. It can collect CPU, RAM, Traffic blah blah usage. And provide graph-based with historical data.

Posted by y0us3f, 07-06-2011, 07:05 AM
Tried munin the server gets really slow ! and dno why its not logging to the folder attached a screenshot of the problem when I start httpd service with mysqld , the pids increase then the whole server get slower and the sites wont open " Database error " it was working for a long time now but the problem came back. ----------------- question not related : is there a slowloris apache protection software ? my friend tried attacking the site with one computer using a program called slowloris , and it messed up site , doesnt work Attached Thumbnails  

Posted by madaboutlinux, 07-06-2011, 08:08 AM
Looking at the PIDs it could be anything like high legitimate traffic, an attack OR even a bad plugin/script on one of the domain. You need to check each of Apache processes throughly i.e. which files those processes are accessing during high load, then the Mysql queries in the real time. These 2 will help you a lot to track down the exact problem.

Posted by y0us3f, 07-06-2011, 08:16 AM
Thanks, but how can I check ?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Darkenhosting [merged] (Views: 19175)
WebNX down? (Views: 668)

Language: