Задавайте вопросы, мы ответим
Вы не зашли.
Страниц: 1
Работает сайт сделаный на Битриксе на VPS сервере мастерхоста.
При заходе на сайт mysqld загружает процессор на 20-30% на 1-3 секунды, потом нагрузка спадает, но иногда нагрузка не спадает и сервис приходится рестартовать. В праздники нагрузка держалась 2 дня, при этом сайт не открывался.
панель phpMyAdmin в это время не открывается.
top показывает загрузку mysqld в 30%, как сказали в мастерхосте:
"30% - это процессорная квота от несущего сервера, положенная вам согласно тарифному плану. То, что утилиты типа top показывают как 30% следует воспринимать как полное исчерпание процессорной квоты контейнера и создание процессорной очереди."
Тариф максимально возможный CPU гарантировано, MHz 800.
top - 00:20:13 up 17 days, 3:07, 3 users, load average: 1.31, 1.31, 1.34
Tasks: 46 total, 2 running, 42 sleeping, 2 stopped, 0 zombie
Cpu(s): 4.3%us, 0.0%sy, 0.0%ni, 95.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 66451604k total, 147532k used, 66304072k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
54522 mysql 15 0 244m 48m 4728 S 29.9 0.1 43:05.87 mysqld
56868 root 18 0 2288 1032 820 S 0.3 0.0 0:18.24 top
1 root 15 0 2156 668 572 S 0.0 0.0 0:08.13 init
mysql> SHOW PROCESSLIST;
+------+------+-----------+--------+---------+------+------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+------+-----------+--------+---------+------+------------+------------------------------------------------------------------------------------------------------+
| 1935 | root | localhost | bitrix | Query | 7137 | statistics | SELECT COUNT(DISTINCT BE.ID) as C
FROM b_iblock B
INNER JOIN b_lang L ON B.LID=L.LID
INNER |
| 1952 | root | localhost | bitrix | Query | 6504 | Locked | UPDATE b_iblock_element SET TIMESTAMP_X = TIMESTAMP_X, SHOW_COUNTER_START = ifnull(SHOW_COUNTER_ST |
| 1953 | root | localhost | bitrix | Query | 6456 | Locked | SELECT COUNT(DISTINCT BE.ID) as C
FROM b_iblock B
INNER JOIN b_lang L ON B.LID=L.LID
INNER |
| 1954 | root | localhost | bitrix | Query | 6344 | Locked | SELECT COUNT(DISTINCT BE.ID) as C
FROM b_iblock B
INNER JOIN b_lang L ON B.LID=L.LID
INNER |
| 1955 | root | localhost | bitrix | Query | 6325 | Locked | SELECT COUNT(DISTINCT BE.ID) as C
FROM b_iblock B
INNER JOIN b_lang L ON B.LID=L.LID
INNER |
| 1957 | root | localhost | NULL | Sleep | 1794 | | NULL |
| 1962 | root | localhost | NULL | Query | 0 | NULL | SHOW PROCESSLIST |
+------+------+-----------+--------+---------+------+------------+------------------------------------------------------------------------------------------------------+
7 rows in set (0.10 sec)
mysql> status;
--------------
mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
Connection id: 1962
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.77 Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 7 hours 23 min 9 sec
Threads: 7 Questions: 125594 Slow queries: 0 Opens: 175 Flush tables: 1 Open tables: 169 Queries per second avg: 4.724
SHOW FULL PROCESSLIST выдает много всего, и начала не видно при подключении по ssh.
mysql> SHOW GLOBAL STATUS;
+-----------------------------------+-----------+
| Variable_name | Value |
+-----------------------------------+-----------+
| Aborted_clients | 0 |
| Aborted_connects | 3 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 65866143 |
| Bytes_sent | 310130205 |
| Com_admin_commands | 0 |
| Com_alter_db | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_call_procedure | 0 |
| Com_change_db | 2079 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 0 |
| Com_create_user | 0 |
| Com_dealloc_sql | 0 |
| Com_delete | 26 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 0 |
| Com_insert_select | 0 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 0 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 18746 |
| Com_set_option | 1954 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 0 |
| Com_show_databases | 0 |
| Com_show_errors | 0 |
| Com_show_fields | 114 |
| Com_show_grants | 0 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 0 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 7 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 3 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 0 |
| Com_show_triggers | 0 |
| Com_show_variables | 0 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 880 |
| Com_update_multi | 0 |
| Com_xa_commit | 0 |
| Com_xa_end | 0 |
| Com_xa_prepare | 0 |
| Com_xa_recover | 0 |
| Com_xa_rollback | 0 |
| Com_xa_start | 0 |
| Compression | OFF |
| Connections | 1965 |
| Created_tmp_disk_tables | 9891 |
| Created_tmp_files | 5 |
| Created_tmp_tables | 22235 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 9 |
| Handler_discover | 0 |
| Handler_prepare | 0 |
| Handler_read_first | 18448 |
| Handler_read_key | 1374199 |
| Handler_read_next | 2024017 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 261218 |
| Handler_read_rnd_next | 682660 |
| Handler_rollback | 0 |
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
| Handler_update | 127843 |
| Handler_write | 630393 |
| Innodb_buffer_pool_pages_data | 64 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 0 |
| Innodb_buffer_pool_pages_free | 8128 |
| Innodb_buffer_pool_pages_misc | 0 |
| Innodb_buffer_pool_pages_total | 8192 |
| Innodb_buffer_pool_read_ahead_rnd | 1 |
| Innodb_buffer_pool_read_ahead_seq | 0 |
| Innodb_buffer_pool_read_requests | 166 |
| Innodb_buffer_pool_reads | 13 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 0 |
| Innodb_data_fsyncs | 3 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 3231744 |
| Innodb_data_reads | 26 |
| Innodb_data_writes | 3 |
| Innodb_data_written | 1536 |
| Innodb_dblwr_pages_written | 0 |
| Innodb_dblwr_writes | 0 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 0 |
| Innodb_log_writes | 1 |
| Innodb_os_log_fsyncs | 3 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 512 |
| Innodb_page_size | 16384 |
| Innodb_pages_created | 0 |
| Innodb_pages_read | 64 |
| Innodb_pages_written | 0 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 0 |
| Innodb_row_lock_time_avg | 0 |
| Innodb_row_lock_time_max | 0 |
| Innodb_row_lock_waits | 0 |
| Innodb_rows_deleted | 0 |
| Innodb_rows_inserted | 0 |
| Innodb_rows_read | 0 |
| Innodb_rows_updated | 0 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 3632 |
| Key_blocks_used | 3619 |
| Key_read_requests | 5947927 |
| Key_reads | 13278 |
| Key_write_requests | 169797 |
| Key_writes | 938 |
| Last_query_cost | 0.000000 |
| Max_used_connections | 7 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 228 |
| Open_streams | 0 |
| Open_tables | 169 |
| Opened_tables | 175 |
| Prepared_stmt_count | 0 |
| Qcache_free_blocks | 66 |
| Qcache_free_memory | 50878264 |
| Qcache_hits | 99825 |
| Qcache_inserts | 10490 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 8255 |
| Qcache_queries_in_cache | 3230 |
| Qcache_total_blocks | 6575 |
| Queries | 125599 |
| Questions | 125599 |
| Rpl_status | NULL |
| Select_full_join | 3526 |
| Select_full_range_join | 1838 |
| Select_range | 5181 |
| Select_range_check | 0 |
| Select_scan | 6935 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 2241 |
| Sort_rows | 132362 |
| Sort_scan | 10207 |
| Ssl_accept_renegotiates | 0 |
| Ssl_accepts | 0 |
| Ssl_callback_cache_hits | 0 |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_ctx_verify_depth | 0 |
| Ssl_ctx_verify_mode | 0 |
| Ssl_default_timeout | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_sessions_reused | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_version | |
| Table_locks_immediate | 151398 |
| Table_locks_waited | 4 |
| Tc_log_max_pages_used | 0 |
| Tc_log_page_size | 0 |
| Tc_log_page_waits | 0 |
| Threads_cached | 0 |
| Threads_connected | 7 |
| Threads_created | 7 |
| Threads_running | 6 |
| Uptime | 27876 |
| Uptime_since_flush_status | 125599 |
+-----------------------------------+-----------+
249 rows in set (0.03 sec)
Как поправить, что смотреть?
Разработчики сайта говорят, что мол сервер у вас слабый, мы можем предложить услуги хостинга...
На виртуальной машине, выдаваемой Битриксом при 3х смотрящих сайт, загрузка mysqld кратковременно поднималась до 60-70%.
При открытии страницы, Битрикс пишет что запросов к базе 95 штук.
Отредактированно Fluke01 (16.05.2011 19:13:39)
Неактивен
| 1935 | root | localhost | bitrix | Query | 7137 | statistics | SELECT COUNT(DISTINCT BE.ID) as C
FROM b_iblock B
INNER JOIN b_lang L ON B.LID=L.LID
INNER |
Вот этот запрос работает медленно, и при этом блокирует таблицы. Можно пробовать
перейти на InnoDB, например, чтобы избавиться от блокировок. Ну и надо смотреть
на EXPLAIN запроса (SHOW FULL PROCESSLIST покажет его целиком) и на наличие
индексов.
Неактивен
Я правильно понимаю, что ошибка не связана с настройкой сервера, а связана либо с неправильным выбором типа базы, либо с некорректными запросами к базе mysql?
Очередное зависание сайта, explain посмотреть не смог,
mysql> explain bitrix;
ERROR 1046 (3D000): No database selected
хотя таблица есть:
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| bitrix |
| mysql |
| sitemanager |
| test |
+--------------------+
5 rows in set (0.16 sec)
mysql> SHOW TABLE STATUS bitrix;
ERROR 1046 (3D000): No database selected
Такая же ситуация с индексами
mysql> SHOW INDEX bitrix;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bitrix' at line 1
[root@v11335 ~]# mysql -e "show full processlist;" -u root -p >1234.txt
из файла:
Id User Host db Command Time State Info
16829 root localhost bitrix Query 22232 statistics SELECT COUNT(DISTINCT BE.ID) as C \n\t\t\tFROM b_iblock B\n\t\t\tINNER JOIN b_lang L ON B.LID=L.LID\n\t\t\tINNER JOIN b_iblock_element BE ON BE.IBLOCK_ID = B.ID\n\t\t\tLEFT JOIN b_iblock_property FP0 ON FP0.IBLOCK_ID = B.ID AND FP0.CODE='OVNERPRICE'\n\t\t\tLEFT JOIN b_iblock_property FP1 ON FP1.IBLOCK_ID = B.ID AND FP1.CODE='CURRENCY'\n\t\t\tINNER JOIN b_iblock_property FP2 ON FP2.IBLOCK_ID = B.ID AND FP2.CODE='TYPECATEGORIES'\n\t\t\tINNER JOIN b_iblock_property FP3 ON FP3.IBLOCK_ID = B.ID AND FP3.CODE='DIRECTION'\n\t\t\tINNER JOIN b_iblock_property FP4 ON FP4.IBLOCK_ID = B.ID AND FP4.CODE='SPESHIAL'\n\t\t\tINNER JOIN b_iblock_property FP5 ON FP5.IBLOCK_ID = B.ID AND FP5.CODE='DISTANCEMOSCOW'\n\t\t\tINNER JOIN b_iblock_property FP6 ON FP6.IBLOCK_ID = B.ID AND FP6.CODE='AREAHOMES'\n\t\t\tINNER JOIN b_iblock_property FP7 ON FP7.IBLOCK_ID = B.ID AND FP7.CODE='LOTSIZE'\n\t\t\tLEFT JOIN b_iblock_property FP8 ON FP8.IBLOCK_ID = B.ID AND FP8.CODE='PLACEONTHESITE'\n\t\t\tLEFT JOIN b_iblock_element_property FPV0 ON FPV0.IBLOCK_PROPERTY_ID = FP0.ID AND FPV0.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tLEFT JOIN b_iblock_element_property FPV1 ON FPV1.IBLOCK_PROPERTY_ID = FP1.ID AND FPV1.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_element_property FPV2 ON FPV2.IBLOCK_PROPERTY_ID = FP2.ID AND FPV2.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_element_property FPV3 ON FPV3.IBLOCK_PROPERTY_ID = FP3.ID AND FPV3.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_element_property FPV4 ON FPV4.IBLOCK_PROPERTY_ID = FP4.ID AND FPV4.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_element_property FPV5 ON FPV5.IBLOCK_PROPERTY_ID = FP5.ID AND FPV5.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_element_property FPV6 ON FPV6.IBLOCK_PROPERTY_ID = FP6.ID AND FPV6.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_element_property FPV7 ON FPV7.IBLOCK_PROPERTY_ID = FP7.ID AND FPV7.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tLEFT JOIN b_iblock_element_property FPV8 ON FPV8.IBLOCK_PROPERTY_ID = FP8.ID AND FPV8.IBLOCK_ELEMENT_ID = BE.ID\n\t\t\tINNER JOIN b_iblock_property_enum FPEN0 ON FPEN0.PROPERTY_ID = FPV4.IBLOCK_PROPERTY_ID AND FPV4.VALUE_ENUM = FPEN0.ID\n\t\t\t INNER JOIN (\n\t\t\t\t\tSELECT DISTINCT B.ID\n\t\t\t\t\tFROM b_iblock B\n\t\t\t\t\tINNER JOIN b_iblock_site BS ON BS.IBLOCK_ID = B.ID\n\t\t\t\t\tINNER JOIN b_iblock_group IBG ON IBG.IBLOCK_ID = B.ID\n\t\t\t\t\tWHERE\n\t\t\t\t\t((((BS.SITE_ID='s1')))) AND ((\n\t\t\t\t\t\tIBG.GROUP_ID IN (2)\n\t\t\t\t\t\tAND IBG.PERMISSION >= 'R'\n\t\t\t\t\t\tAND (IBG.PERMISSION='X' OR B.ACTIVE='Y')\n\t\t\t\t\t)) AND ((((B.ID = '24')))) AND ((((B.ACTIVE='Y'))))\n\t\t\t\t) BB ON BB.ID = BE.IBLOCK_ID\n\n \n\t\t\tLEFT JOIN b_catalog_price CAT_P1 ON (CAT_P1.PRODUCT_ID = BE.ID AND CAT_P1.CATALOG_GROUP_ID = 1) AND ((CAT_P1.QUANTITY_FROM <= 1 OR CAT_P1.QUANTITY_FROM IS NULL) AND (CAT_P1.QUANTITY_TO >= 1 OR CAT_P1.QUANTITY_TO IS NULL)) \n\t\t\tLEFT JOIN b_catalog_product CAT_PR ON (CAT_PR.ID = BE.ID) \n\t\t\tLEFT JOIN b_catalog_iblock CAT_IB ON ((CAT_PR.VAT_ID IS NULL OR CAT_PR.VAT_ID = 0) AND CAT_IB.IBLOCK_ID = BE.IBLOCK_ID) \n\t\t\tLEFT JOIN b_catalog_vat CAT_VAT ON (CAT_VAT.ID = IF((CAT_PR.VAT_ID IS NULL OR CAT_PR.VAT_ID = 0), CAT_IB.VAT_ID, CAT_PR.VAT_ID)) \n\n\t\t\tWHERE 1=1 \n\t\t\tAND (\n\t\t\t\n\t\t\t\t((((BE.ACTIVE='Y'))))\n\t\t\t\tAND ((((BE.IBLOCK_ID = '24'))))\n\t\t\t\tAND (\n\t\t\t\t\n\t\t\t\t\t(\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM <= '447774000'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'Рубли'))))\n\t\t\t\t\t)\n\t\t\t\t\tOR (\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM <= '9403204'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'Фунты'))))\n\t\t\t\t\t)\n\t\t\t\t\tOR (\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM <= '11039140'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'Евро'))))\n\t\t\t\t\t)\n\t\t\t\t\tOR (\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM <= '15000000'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'ДолларСША'))))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tAND (\n\t\t\t\t\n\t\t\t\t\t(\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM >= '298516000'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'Рубли'))))\n\t\t\t\t\t)\n\t\t\t\t\tOR (\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM >= '6268803'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'Фунты'))))\n\t\t\t\t\t)\n\t\t\t\t\tOR (\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM >= '7359426'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'Евро'))))\n\t\t\t\t\t)\n\t\t\t\t\tOR (\n\t\t\t\t\t\n\t\t\t\t\t\t((((FPV0.VALUE_NUM >= '10000000'))))\n\t\t\t\t\t\tAND ((((FPV1.VALUE LIKE 'ДолларСША'))))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tAND ((((B.ACTIVE='Y'))))\n\t\t\t\tAND (((BE.ACTIVE_TO >= now() OR BE.ACTIVE_TO IS NULL) AND (BE.ACTIVE_FROM <= now() OR BE.ACTIVE_FROM IS NULL)))\n\t\t\t\tAND ( 1=1 )\n\t\t\t\tAND ((((FPV2.VALUE LIKE 'продажа'))))\n\t\t\t\tAND ((((FPV3.VALUE LIKE '8883c26a-d09b-11db-a367-0018f37f186c'))))\n\t\t\t\tAND ((((FPEN0.VALUE LIKE 'Y'))))\n\t\t\t\tAND ((((FPV5.VALUE_NUM <= '30'))))\n\t\t\t\tAND ((((FPV6.VALUE_NUM <= '1300'))))\n\t\t\t\tAND ((((FPV7.VALUE_NUM <= '50'))))\n\t\t\t\tAND ((((FPV5.VALUE_NUM >= '20'))))\n\t\t\t\tAND ((((FPV6.VALUE_NUM >= '700'))))\n\t\t\t\tAND ((((FPV7.VALUE_NUM >= '25'))))\n\t\t\t\tAND ((( FPV8.VALUE_NUM IS NULL OR NOT (FPV8.VALUE_NUM = '0'))))\n\t\t\t\tAND (BE.IN_SECTIONS='N')\n\t\t\t)\n\t\t\tAND (((BE.WF_STATUS_ID=1 AND BE.WF_PARENT_ELEMENT_ID IS NULL)))
16836 root localhost bitrix Sleep 23279 NULL
16842 root localhost NULL Query 0 NULL show full processlist
[root@v11335 ~]# myisamchk
Warning: option 'key_buffer_size': unsigned value 18446744073709551615 adjusted to 4294963200
Warning: option 'read_buffer_size': unsigned value 18446744073709551615 adjusted to 4294967295
Warning: option 'write_buffer_size': unsigned value 18446744073709551615 adjuste d to 4294967295
Warning: option 'sort_buffer_size': unsigned value 18446744073709551615 adjusted to 4294967295
myisamchk Ver 2.7 for redhat-linux-gnu at i686
By Monty, for your professional use
This software comes with NO WARRANTY: see the PUBLIC for details.
---
тут вырезал ключи запуска
---
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
character-sets-dir (No default value)
data-file-length 0
keys-used 18446744073709551615
max-record-length 9223372036854775807
set-auto-increment 0
set-collation (No default value)
sort-records 0
tmpdir (No default value)
key_buffer_size 520192
key_cache_block_size 1024
myisam_block_size 1024
read_buffer_size 262136
write_buffer_size 262136
sort_buffer_size 2097144
sort_key_blocks 16
decode_bits 9
ft_min_word_len 4
ft_max_word_len 84
ft_stopword_file (No default value)
stats_method nulls_unequal
Неактивен
«No database selected» означает, что не выбрана база данных. Нужно
сказать use dbname (подставить правильное название базы, разумеется),
и после этого уже можно будет делать SHOW TABLE STATUS LIKE '...'.
Что касается запроса — Вы сами видите его — он страшен и ужасен,
я даже боюсь себе представить, для чего он нужен. Попробуйте выпол-
нить EXPLAIN SELECT ... — хоть какую-то статистику по нему соберем.
Скорее всего, поможет смена хранилища на InnoDB: по крайней мере,
не будут блокироваться таблицы, хотя, от этого запроса, разумеется,
не спасет.
Неактивен
В нужной базе всем таблицам поменял тип с MyISAM на InnoDB.
В конфигурацию Битрикса /bitrix/php_interface/dbconn.php добавил параметр define("MYSQL_TABLE_TYPE", "InnoDB");
Пока ситуация, когда сайт не отвечает не было.
EXPLAIN выполню и отпишусь.
Неактивен
Страниц: 1