1

我有一个每秒 10,000 个查询的生产系统。我最近更新到 MySQL v5.5,现在面临一个问题:我的InnoDB表突然被锁定。

等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 插入 PS(PREFERENCE、PROPERTY_TYPE、RES_COM、BEDROOM_NUM、BATHROOM_NUM、PRIC
更新 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | UPDATE property.PROFILE SET PASSWORD=AES_ENCRYPT(XXX) WHERE PROFILEID='4987835'
等待表级锁 | UPDATE property.PROFILE SET PASSWORD=AES_ENCRYPT(XXXX) WHERE PROFILEID='5405007'
等待表级锁 | 更新 PP 设置筛选 = 'N' 其中 PROFILEID='560353'
等待表级锁 | 更新 PP SET PASSWORD=AES_ENCRYPT(XXXX) 其中 PROFILEID='5405009'
等待表级锁 | 更新 PP SET PASSWORD=AES_ENCRYPT(XXXXX) 其中 PROFILEID='4987835'
等待表级锁 | 更新 PP SET PASSWORD=AES_ENCRYPT(XXXX) 其中 PROFILEID='540502'
等待表级锁 | 更新 PS SET 激活 = 'Y',筛选 = 'N' 其中 SPID = '8252535'
等待表级锁 | 更新 PP SET MODIFY_DATE = now() WHERE PROFILEID = '3481803'

这里可能是什么问题?

下面的输出SHOW VARIABLES LIKE '%innodb%';

+---------------------------------+---------------- ----------+
| 变量名 | 价值 |
+---------------------------------+---------------- ----------+
| 有_innodb | 是 |
| 忽略内置innodb | 关闭 |
| innodb_adaptive_flushing | 开 |
| innodb_adaptive_hash_index | 开 |
| innodb_additional_mem_pool_size | 134217728 |
| innodb_autoextend_increment | 8 |
| innodb_autoinc_lock_mode | 1 |
| innodb_buffer_pool_instances | 5 |
| innodb_buffer_pool_size | 3221225472 |
| innodb_change_buffering | 全部 |
| innodb_checksums | 开 |
| innodb_commit_concurrency | 50 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | ibdata1:100M:自动扩展 |
| innodb_data_home_dir | mysql5/数据/ |
| innodb_doublewrite | 开 |
| innodb_fast_shutdown | 1 |
| innodb_file_format | 羚羊 |
| innodb_file_format_check | 开 |
| innodb_file_format_max | 羚羊 |
| innodb_file_per_table | 开 |
| innodb_flush_log_at_trx_commit | 2 |
| innodb_flush_method | O_DIRECT |
| innodb_force_load_corrupted | 关闭 |
| innodb_force_recovery | 0 |
| innodb_io_capacity | 200 |
| innodb_large_prefix | 关闭 |
| innodb_lock_wait_timeout | 100 |
| innodb_locks_unsafe_for_binlog | 关闭 |
| innodb_log_buffer_size | 8388608 |
| innodb_log_file_size | 536870912 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | ./ |
| innodb_max_dirty_pages_pct | 75 |
| innodb_max_purge_lag | 0 |
| innodb_mirrored_log_groups | 1 |
| innodb_old_blocks_pct | 37 |
| innodb_old_blocks_time | 0 |
| innodb_open_files | 300 |
| innodb_purge_batch_size | 100 |
| innodb_purge_threads | 0 |
| innodb_random_read_ahead | 关闭 |
| innodb_read_ahead_threshold | 56 |
| innodb_read_io_threads | 4 |
| innodb_replication_delay | 0 |
| innodb_rollback_on_timeout | 关闭 |
| innodb_rollback_segments | 64 |
| innodb_spin_wait_delay | 6 |
| innodb_stats_method | nulls_equal |
| innodb_stats_on_metadata | 开 |
| innodb_stats_sample_pages | 8 |
| innodb_strict_mode | 关闭 |
| innodb_support_xa | 开 |
| innodb_sync_spin_loops | 30 |
| innodb_table_locks | 开 |
| innodb_thread_concurrency | 0 |
| innodb_thread_sleep_delay | 10000 |
| innodb_use_native_aio | 开 |
| innodb_use_sys_malloc | 开 |
| innodb_version | 1.1.8 |
| innodb_write_io_threads | 4 |
+---------------------------------+---------------- ----------+
4

0 回答 0