WebFaction
Community site: login faq

For a while now, I've received service messages that a query against a WordPress database was killed for running over a minute. It happens for two separate installs. This was originally just an occasional occurrence, but has recently increased to every few days, and I was curious if anyone else has seen this, maybe figured out exactly what the cause is, or could provide some ideas for hunting it down. The only plugins I've found for scanning queries involve things that happen while moving around in the application. But these errors always happen when I'm not in there, so appear to be from some scheduled process. (Posting of items is handled via queue, and the notices do not correlate either with me creating items or with publishing.) I haven't found a plugin or whatever that'll log that sort of thing.

The query in question is:


    SELECT ID, post_author, post_date, post_date_gmt, post_status, 
post_name, post_modified, post_modified_gmt, post_parent, post_type
FROM nwc_posts WHERE ( (post_status = 'publish' AND (post_type = 'post' OR post_type = '')) 
OR (post_status = 'publish' AND post_type = 'page') ) 
AND post_password='' ORDER BY post_modified DESC

The thing about it is that as far as I can tell, it's completely stock(ie. not obviously from a plugin).
All it does is return all published entries and pages. And, if you run it via phpMyAdmin, it's plenty fast. On an install that returns 1766 rows at the moment, it runs in well under 1sec, much less a minute plus.
Any ideas?

asked 20 Jan '13, 05:49

Su%20Generis's gravatar image

Su Generis
2527
accept rate: 0%

edited 20 Jan '13, 05:51


When a stock WP query is running slow, the cause is usually a general high load condition on your server, probably not caused by your own processes. If you think this might be the case, then feel free to ignore the warning, or open a support ticket if you need us to look into it further for you.

permanent link

answered 21 Jan '13, 10:11

seanf's gravatar image

seanf ♦♦
11.9k21333
accept rate: 37%

[Notifications weren't set up properly.] Yeah, I also filed a ticket at the time regarding performance and it turned out a db process was eating the server. Seems to be mostly under control for the moment; back to the much-more-occasional rate of incidence.

(28 Jan '13, 10:44) Su Generis Su%20Generis's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×238
×9
×7

question asked: 20 Jan '13, 05:49

question was seen: 3,110 times

last updated: 28 Jan '13, 10:44

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2017 PARAGON INTERNET GROUP LIMITED
WEBFACTION IS A SERVICE OF PARAGON INTERNET GROUP LIMITED
REGISTERED IN ENGLAND AND WALES 7573953 - VAT REGISTRATION NUMBER 182147021
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM