An answer on this would be great! I have the same problem. My hosting is wpengine.com.
Error logs are full of LONG QUERY warnings from spam comments
Long Query
When you see an entry in the log that looks similar to this
[Wed Mar 26 06:26:19 2014] [error] [client 127.0.0.1] LONG QUERY: SELECT DISTINCT user.ID AS user_id, t.* FROM …
We have included it in the log to signify that the length of the query, which would be over 1,024 characters, is a Long Query and may be able to be optimized. We did not take any action on this query, it is just a notice to our customers. These only apply to Select statements, and not any other type of statements.
http://wpengine.com/support/long-query-killed-query-error-logs/
ok, but in our case we have many sites running on a multisite install, so the error log has become completely unusable for any sort of monitoring. I’m also baffled why this query would be running on the front end of the site. It shouldn’t be looking for spam comments at all.
(@ryankanner)
12 years, 1 month ago
My hosting company recently turned on the error reporting for slow queries in php/apache and we have seen the error logs get flooded with errors all from queries requesting spam comments on the front end of the site. We are using akismet to catch the spam, which is working just fine. The referrers are all coming from blog posts, and you can see an example of the error below (I have changed details of the log for security & anonymity.)
I can’t figure out for the life of me why this query would be running on the front end of the site. I don’t understand why WordPress would even be querying spam comments here. I tried to modify the query using the filter below, but it did not work at all.
Has anyone seen this sort of error before / have a fix for it?