ukscotth Posted April 5, 2013 Share Posted April 5, 2013 Hi, Recently I have been getting emails warning me of a high system load ( up in the 20s ). I look at the processes and its always mysql thats using all the cpu. I have been fixing the problem by simply rebooting the server which obviously isnt the right thing to do. Can anyone please tell me how I can find out what site and user it is that is causing the high cpu load when it happens ? Many thanks, Scott. Quote Link to comment https://forums.phpfreaks.com/topic/276566-mysql-using-up-all-memory/ Share on other sites More sharing options...
requinix Posted April 5, 2013 Share Posted April 5, 2013 The title says memory but your post says CPU. MySQL should be using as much memory as it possibly can. That's a good thing. If it's using too much CPU then it's probably choking on some difficult queries. Use the slow query log (or do some SHOW FULL PROCESSLISTs) to see what it's trying to work on during those high loads. Quote Link to comment https://forums.phpfreaks.com/topic/276566-mysql-using-up-all-memory/#findComment-1423132 Share on other sites More sharing options...
ukscotth Posted April 9, 2013 Author Share Posted April 9, 2013 Sorry I meant CPU. How can I see the slow query log ? also I can access the processlist through phpmyadmin but only when im logged in as a user, is there a way to do it for all users ? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/276566-mysql-using-up-all-memory/#findComment-1423757 Share on other sites More sharing options...
requinix Posted April 9, 2013 Share Posted April 9, 2013 The slow query log. It's generally disabled because it can be a bit of a performance hit but at that point you're already suffering. For the query, try connecting as root. Quote Link to comment https://forums.phpfreaks.com/topic/276566-mysql-using-up-all-memory/#findComment-1423826 Share on other sites More sharing options...
ukscotth Posted April 14, 2013 Author Share Posted April 14, 2013 Thanks but where do i login as root, in phpmyadmin or putty ? sorry for being dumb lol Quote Link to comment https://forums.phpfreaks.com/topic/276566-mysql-using-up-all-memory/#findComment-1424678 Share on other sites More sharing options...
requinix Posted April 14, 2013 Share Posted April 14, 2013 Log in to phpMyAdmin as root and run SHOW FULL PROCESSLIST. Quote Link to comment https://forums.phpfreaks.com/topic/276566-mysql-using-up-all-memory/#findComment-1424745 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.