MySQL error “Query execution was interrupted” after query_posts
-
Hello. I’m using query_posts in my loop like this:
<?php $args = array( 'tag_slug__in' => $cat_id, 'posts_per_page' => 15, 'paged' => $page, 'meta_query' => array( array( 'key' => 'Пол', 'value' => $value_sex, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Английский', 'value' => $english, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Французский', 'value' => $france, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Немецкий', 'value' => $germany, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Итальянский', 'value' => $italy, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Испанский', 'value' => $spain, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Китайский', 'value' => $chine, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Длина волос', 'value' => $hair_length, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Цвет волос', 'value' => $hair_color, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Удобные дни работы', 'value' => $value_days, 'compare' => 'EXISTS', 'type' => 'CHAR', ), array( 'key' => 'Удобное время работы', 'value' => $value_time, 'compare' => 'IN', 'type' => 'CHAR', ), array( 'key' => 'Рост (см)', 'value' => array( $value_height, $value_height_max ), 'type' => 'numeric', 'compare' => 'BETWEEN', ), array( 'key' => 'Размер одежды', 'value' => array( $value_dress, $value_dress_max ), 'type' => 'numeric', 'compare' => 'BETWEEN', ), array( 'key' => 'Размер бюста', 'value' => array( $value_bust, $value_bust_max ), 'type' => 'numeric', 'compare' => 'BETWEEN', ), ) ); ?> <?php query_posts($args); ?>
This code works well for fresh installed WP, but after importing 100 posts with different custom fields site crashed. Error logs says: “Query execution was interrupted”, “Lost connection to MySQL server during query” and “MySQL server has gone away”
Loooks like crashed by timeout, but can’t find out a solution of my problem, anybody can help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘MySQL error “Query execution was interrupted” after query_posts’ is closed to new replies.