Title: Incomplete Queries?
Last modified: August 22, 2016

---

# Incomplete Queries?

 *  [OscarGuy](https://wordpress.org/support/users/oscarguy/)
 * (@oscarguy)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/incomplete-queries/)
 * I keep succumbing to an error “Error establishing a database connection”
 * The lat time I had my site manager look into this, he found a series of incomplete
   queries. (examples below)
 * I don’t have any idea what any of these means, but I’m wondering if there’s a
   way to tell if there’s a plugin or something else that might be causing this (
   and not completing the queries) that would force the IP to force-end all queries
   and repair the DB in order to get it to work again. I also have no idea how to
   kill queries or I’d try doing it myself. Thoughts?
 * | 4233454 | cinemasi_admin | localhost | oscarguy_blogs | Query | 26816 | Sending
   data | SELECT ID FROM wp_posts WHERE ( ( post_date > 0 && post_date <= ‘2015-
   02-17 12:16:04’ ) ) AND post_s | 0.000 |
    | 4235163 | cinemasi_admin | localhost
   | oscarguy_blogs | Query | 26554 | Waiting for table level lock | UPDATE `wp_posts`
   SET `post_author` = 1, `post_date` = ‘2015-02-18 11:00:58’, `post_date_gmt` =‘
   201 | 0.000 | | 4235211 | cinemasi_admin | localhost | oscarguy_blogs | Query
   | 26547 | Waiting for table level lock | SELECT ID FROM wp_posts WHERE ( ( post_date
   > 0 && post_date <= ‘2015-02-17 12:20:33’ ) ) AND post_s | 0.000 | | 4235240 
   | cinemasi_admin | localhost | oscarguy_blogs | Query | 26542 | Waiting for table
   level lock | SELECT ID FROM wp_posts WHERE ( ( post_date > 0 && post_date <= ‘
   2015-02-17 12:20:38’ ) ) AND post_s | 0.000 | | 4235344 | cinemasi_admin | localhost
   | oscarguy_blogs | Query | 26524 | Waiting for table level lock | SELECT ID FROM
   wp_posts WHERE ( ( post_date > 0 && post_date <= ‘2015-02-17 12:20:56’ ) ) AND
   post_s | 0.000 |

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/incomplete-queries/#post-5821377)
 * That looks like your database server is lacking enough resources/power to handle
   the queries. As the log says, the first query is executing, but taking a logn
   time, and the other queries are waiting for that to finish so they can start.
   The first query doesn’t look that inovlved from the small snippet that it shown
   in that log, but if we could see the entire thing may it would be a little different.
   But it still doesn’t look liek it’s that big, so there’s no real reason that 
   it should take so long to do, which brings it back to the database server not
   being able to handle the queries.
 *  Thread Starter [OscarGuy](https://wordpress.org/support/users/oscarguy/)
 * (@oscarguy)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/incomplete-queries/#post-5821383)
 * Could it be a plugin or a theme issue that would cause it to hang?
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/incomplete-queries/#post-5821386)
 * Yes, if the queries are from a plugin or the theme it woudl be that. But you 
   need to find out what the queries are and see where they are coming from. Without
   knowing that you’ll be just guessing.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Incomplete Queries?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/incomplete-queries/#post-5821386)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
