Having a Recurring MySQL Server Bandwidth Overload

code_horrors
code_horrors used Ask the Experts™
on
We're running MySQL version 5.1.73.

We're having a recurring issue where our database server is being overloaded. Currently, we're monitoring about 1.18 MB/s of incoming traffic, with 200 queries per second on a server supporting roughly 25 WordPress-based sites. In the attached log file, we've noticed lines including things like:

3 Query	SELECT ID, post_name, post_parent, post_type
		FROM wp_posts
		WHERE post_name IN ('buy-cialis-jellya-online')
		AND post_type IN ('page','attachment')
		    3 Query	SELECT wp_term_taxonomy.term_id
					FROM wp_term_taxonomy
					INNER JOIN wp_terms USING (term_id)
					WHERE taxonomy = 'category'
					AND wp_terms.slug IN ('buy-cialis-jellya-online')

Any help figuring out what this means and if it's correlated, we would appreciate it.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
Someone is probably spamming your Wordpress search forms.  You will probably have to go to the web server logs to see where those requests are coming from and block them.  You could also filter the Wordpress search code to block those requests from being sent to the MySQL server.

Author

Commented:
Thank you for the reply.  Can you describe how you would filter the Wordpress search code to block those requests?
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
That's a good question but the answer is not obvious in the Wordpress code.  Please click on "Request Attention" and get the Wordpress topic area added to your question.  I'll see if there is a common answer also.
Cloud/Infrastructure Solutions Architect
Commented:
Wordpress has many built-in functions for preventing spam, but there are also a number of plugins available that can help as well. CAPTCHA based functionality is a good start for being able to even post comments.

http://codex.wordpress.org/Combating_Comment_Spam
https://wordpress.org/plugins/stop-spam-comments/
http://www.elegantthemes.com/blog/tips-tricks/reduce-wordpress-comment-spam

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial