Recently I found that one of servers was very slow and customers were complaining. I found that the load on the server was consistently above 15.Β The culprit was huge 8Gb eximstats MySQL database maintained by cPanel and low free disk space. I fixed it by proceeding as follows:
– Logged in to server using ssh
– ‘df -h’ revealed onlyΒ 7 Gb was free disk space out of 110 Gb. Not a happy sign.
– Did ‘cd /’ followed by ‘du -h –max-depth=1’. It revealed that /var folder was occupying overΒ 20 Gb space
– Futher investigations reveled that the eximstats database in /var/lib/mysql was occupying 8 Gb of space. I decided toΒ handle that.
You can do all of the above via WHM too. In WHM -> Server Status -> Server Information, current disk usage section will give you free disk space. WHM -> phpMyAdmin and selecting eximstats database shows how much disk space itΒ occupies.
I searched in Google to find out more about eximstats. ItΒ seems,Β these are stats of exim maintained by cPanel. By default, cPanel retainsΒ stats for 30 days.Β Time for more action …. logged in to WHM
– In WHM -> Tweak settings -> Stats and Logs section, changed valueΒ of Β “The interval, in days, to retain Exim stats in the database”Β from 10 toΒ 7 and clicked save
– To save disk space, I decided to retain only Webalizer stats.Β Went toΒ WHM -> Tweak settingsΒ “Stats” section. Disabled all stats programs except Webalizer and clicked Save
Now time to clean up the eximstats database.
– In WHM -> phpMyAdmin selected eximstats database andΒ “truncate” all tablesΒ i.e. sends, smtp, failuresΒ and defer. This took a very long time as the size of database was big.
Now I checked free disk space via WHM -> Server Status -> Server Information . Current disk usage section was showing 15 Gb of free disk space. That was a good sign. Just to be sure I rebooted the server using WHM-> System Reboot -> Graceful Server Reboot. After sometime when server came online, I found that theΒ server loadΒ settled toΒ 0.9 to 1.2 and free disk space was over 15 gb!
I logged inΒ to server again afterΒ a few days. ServerΒ load wasΒ still Β between 0.5 to 1.5 and free space was around 20Gb. What a relief!



