1

Munin showing huge spike on MySQL queries every hour but I am unable to detect what is causing this. I am running version 5.6.30.

  • Tried to enable slow running queries but can't find it there.
  • Also logged all queries and tried to see what is running on that particular time. I cannot find it.
  • Checked cronjobs but there wasn't anything related
  • Disabled almost everything on LFD & CSF
  • The event scheduler status is set to OFF

Is there any other way to find what is running every hour?

Munin graph showing sql queries:

Munin graph showing sql queries

halfer
  • 19,824
  • 17
  • 99
  • 186
KufuT
  • 77
  • 6
  • MySQL has an [event scheduler](https://dev.mysql.com/doc/refman/5.7/en/event-scheduler.html) - have you checked that? What version of MySQL are you running? (please add this to all your questions about MySQL, thanks). – halfer Apr 28 '16 at 21:52
  • MySQL version is 5.6.30 and event scheduler status is set to OFF. – KufuT Apr 28 '16 at 22:39
  • halfer? Can you at least tell me is this normal graphic? Is it same with any MySQL db? – KufuT Apr 29 '16 at 08:25

2 Answers2

1

You can use a shell script and put the instruccion "processlist" and send the output to a log file. Put the delay in seconds that you want for run again the instucction.

while [true];
    mysql -h localhost -u root -ppasswd < process
    delay xtime
done

And the file processlist you put the instrucction "show full processlist"

I hope this help you Regards

dorantese
  • 11
  • 2
  • I can see the list of processes thru WHM & cPanel. Shows nothing which will cause high cpu load repeated every hour. It should be some background task or something. You can see that it is repeat process if you just look at the munin graph. There is no such thing scheduled in our PHP codes. – KufuT Apr 28 '16 at 22:51
1

Some crawlers were mining data from my website. I wasn't able to detect because requests sent from a million different IPs.

Added captcha to website as human control and spikes gone.

KufuT
  • 77
  • 6