title: MySQL vs MariadB: General error: 1205 Lock wait timeout exceeded; try restarting transaction
body: <p>Edit #2: I have now tried two MariaDB databases, one MySQL, and one Percona, and only the MariaDB instances are locking.</p>
  
  <p>I'm having this lock wait timeout exceeded issue with a MariadB (version 5.5.56) on a remote server that I'm not having on a local MySQL (version 5.5.57) instance. I know this because I exported the remote database, then imported it locally, and the problem goes away.</p>
  
  <p>To be sure, the query is very large. Let's just say it's a very large select query with a ton of left and inner joins (see below).</p>
  
  <p>I have tried setting the remote my.cnf file up to be nearly identical to my local server, but running <code>SHOW VARIABLES;</code> there is a pretty big difference, and I really would rather not go through the differences (shown below) line-by-line.  </p>
  
  <p>I'm just wondering if anyone has any clue where to go from here? I have tried some of the suggestions like <a href="https://stackoverflow.com/questions/5836623/getting-lock-wait-timeout-exceeded-try-restarting-transaction-even-though-im">the ones posted here</a> without any luck. </p>
  
  <p>If someone thinks the easiest thing to do is just try to upgrade to MariadB 10.x, I'm game to give that a go. </p>
  
  <p>Thanks.</p>
  
  <p>EDIT: Attaching Diff and SQL Query</p>
  
  <p><strong>SQL Query</strong></p>
  
  <pre><code>SELECT commerce_product.product_id AS product_id, commerce_product.sku AS commerce_product_sku, taxonomy_term_data_field_data_field_sample_name.name AS taxonomy_term_data_field_data_field_sample_name_name, taxonomy_term_data_field_data_field_sample_name.vid AS taxonomy_term_data_field_data_field_sample_name_vid, taxonomy_term_data_field_data_field_sample_name.tid AS taxonomy_term_data_field_data_field_sample_name_tid, taxonomy_term_data_field_data_field_sample_name__taxonomy_vocabulary.machine_name AS taxonomy_term_data_field_data_field_sample_name__taxonomy_vo, taxonomy_term_data_field_data_field_sample_origin.name AS taxonomy_term_data_field_data_field_sample_origin_name, taxonomy_term_data_field_data_field_sample_origin.vid AS taxonomy_term_data_field_data_field_sample_origin_vid, taxonomy_term_data_field_data_field_sample_origin.tid AS taxonomy_term_data_field_data_field_sample_origin_tid, taxonomy_term_data_field_data_field_sample_origin__taxonomy_vocabulary.machine_name AS taxonomy_term_data_field_data_field_sample_origin__taxonomy_, taxonomy_term_data_field_data_field_sample_matrix.name AS taxonomy_term_data_field_data_field_sample_matrix_name, taxonomy_term_data_field_data_field_sample_matrix.vid AS taxonomy_term_data_field_data_field_sample_matrix_vid, taxonomy_term_data_field_data_field_sample_matrix.tid AS taxonomy_term_data_field_data_field_sample_matrix_tid, taxonomy_term_data_field_data_field_sample_matrix__taxonomy_vocabulary.machine_name AS taxonomy_term_data_field_data_field_sample_matrix__taxonomy_, taxonomy_term_data_field_data_field_sample_volume.name AS taxonomy_term_data_field_data_field_sample_volume_name, taxonomy_term_data_field_data_field_sample_volume.vid AS taxonomy_term_data_field_data_field_sample_volume_vid, taxonomy_term_data_field_data_field_sample_volume.tid AS taxonomy_term_data_field_data_field_sample_volume_tid, taxonomy_term_data_field_data_field_sample_volume__taxonomy_vocabulary.machine_name AS taxonomy_term_data_field_data_field_sample_volume__taxonomy_, 'commerce_product' AS field_data_title_field_commerce_product_entity_type, 'commerce_product' AS field_data_commerce_stock_commerce_product_entity_type, 'commerce_product' AS field_data_field_minimum_order_commerce_product_entity_type, 'commerce_product' AS field_data_commerce_price_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_patient_age_commerce_product_entity_, 'commerce_product' AS field_data_field_sample_patient_gender_commerce_product_enti, 'commerce_product' AS field_data_field_sample_patient_ethnicity_commerce_product_e, 'commerce_product' AS field_data_field_measurement_commerce_product_entity_type, 'commerce_product' AS field_data_field_unit_of_measure_commerce_product_entity_typ, 'commerce_product' AS field_data_field_icd10_code_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_storage_temp_commerce_product_entity, 'commerce_product' AS field_data_field_sample_date_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_test_1_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_test_data_1_commerce_product_entity_, 'commerce_product' AS field_data_field_sample_detail_1_commerce_product_entity_typ, 'commerce_product' AS field_data_field_sample_test_2_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_test_data_2_commerce_product_entity_, 'commerce_product' AS field_data_field_sample_detail_2_commerce_product_entity_typ, 'commerce_product' AS field_data_field_sample_test_3_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_test_data_3_commerce_product_entity_, 'commerce_product' AS field_data_field_sample_detail_3_commerce_product_entity_typ, 'commerce_product' AS field_data_field_pdf_commerce_product_entity_type, 'commerce_product' AS field_data_field_additional_information_1_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_1_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_1_commerce_product_entity, 'commerce_product' AS field_data_field_additional_information_2_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_2_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_2_commerce_product_entity, 'commerce_product' AS field_data_field_additional_information_3_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_3_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_3_commerce_product_entity, 'commerce_product' AS field_data_field_additional_information_4_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_4_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_4_commerce_product_entity, 'commerce_product' AS field_data_field_additional_information_5_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_5_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_5_commerce_product_entity, 'commerce_product' AS field_data_field_additional_information_6_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_6_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_6_commerce_product_entity, 'commerce_product' AS field_data_field_additional_information_7_commerce_product_e, 'commerce_product' AS field_data_field_additional_data_7_commerce_product_entity_t, 'commerce_product' AS field_data_field_additional_detail_7_commerce_product_entity, 'commerce_product' AS field_data_field_sample_matrix_commerce_product_entity_type, 'commerce_product' AS field_data_field_sample_origin_commerce_product_entity_type
  FROM 
  {commerce_product} commerce_product
  LEFT JOIN {field_data_field_sample_category} field_data_field_sample_category ON commerce_product.product_id = field_data_field_sample_category.entity_id AND (field_data_field_sample_category.entity_type = 'commerce_product' AND field_data_field_sample_category.deleted = '0')
  INNER JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_sample_category ON field_data_field_sample_category.field_sample_category_tid = taxonomy_term_data_field_data_field_sample_category.tid
  LEFT JOIN {field_data_field_sample_name} field_data_field_sample_name ON commerce_product.product_id = field_data_field_sample_name.entity_id AND (field_data_field_sample_name.entity_type = 'commerce_product' AND field_data_field_sample_name.deleted = '0')
  INNER JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_sample_name ON field_data_field_sample_name.field_sample_name_tid = taxonomy_term_data_field_data_field_sample_name.tid
  LEFT JOIN {field_data_field_sample_matrix} field_data_field_sample_matrix ON commerce_product.product_id = field_data_field_sample_matrix.entity_id AND (field_data_field_sample_matrix.entity_type = 'commerce_product' AND field_data_field_sample_matrix.deleted = '0')
  LEFT JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_sample_matrix ON field_data_field_sample_matrix.field_sample_matrix_tid = taxonomy_term_data_field_data_field_sample_matrix.tid
  LEFT JOIN {field_data_field_sample_origin} field_data_field_sample_origin ON commerce_product.product_id = field_data_field_sample_origin.entity_id AND (field_data_field_sample_origin.entity_type = 'commerce_product' AND field_data_field_sample_origin.deleted = '0')
  LEFT JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_sample_origin ON field_data_field_sample_origin.field_sample_origin_tid = taxonomy_term_data_field_data_field_sample_origin.tid
  LEFT JOIN {field_data_field_sample_volume} field_data_field_sample_volume ON commerce_product.product_id = field_data_field_sample_volume.entity_id AND (field_data_field_sample_volume.entity_type = 'commerce_product' AND field_data_field_sample_volume.deleted = '0')
  LEFT JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_sample_volume ON field_data_field_sample_volume.field_sample_volume_tid = taxonomy_term_data_field_data_field_sample_volume.tid
  LEFT JOIN {field_data_commerce_stock} field_data_commerce_stock ON commerce_product.product_id = field_data_commerce_stock.entity_id AND (field_data_commerce_stock.entity_type = 'commerce_product' AND field_data_commerce_stock.deleted = '0')
  INNER JOIN {field_data_field_qc_sample_verified} field_data_field_qc_sample_verified ON commerce_product.product_id = field_data_field_qc_sample_verified.entity_id AND (field_data_field_qc_sample_verified.entity_type = 'commerce_product' AND field_data_field_qc_sample_verified.deleted = '0')
  LEFT JOIN {field_data_field_sample_results} field_data_field_sample_results ON commerce_product.product_id = field_data_field_sample_results.entity_id AND (field_data_field_sample_results.entity_type = 'commerce_product' AND field_data_field_sample_results.deleted = '0')
  LEFT JOIN {field_data_field_sample_detail_1} field_data_field_sample_detail_1 ON commerce_product.product_id = field_data_field_sample_detail_1.entity_id AND (field_data_field_sample_detail_1.entity_type = 'commerce_product' AND field_data_field_sample_detail_1.deleted = '0')
  LEFT JOIN {field_data_field_sample_detail_2} field_data_field_sample_detail_2 ON commerce_product.product_id = field_data_field_sample_detail_2.entity_id AND (field_data_field_sample_detail_2.entity_type = 'commerce_product' AND field_data_field_sample_detail_2.deleted = '0')
  LEFT JOIN {field_data_field_sample_detail_3} field_data_field_sample_detail_3 ON commerce_product.product_id = field_data_field_sample_detail_3.entity_id AND (field_data_field_sample_detail_3.entity_type = 'commerce_product' AND field_data_field_sample_detail_3.deleted = '0')
  LEFT JOIN {field_data_field_sample_test_1} field_data_field_sample_test_1 ON commerce_product.product_id = field_data_field_sample_test_1.entity_id AND (field_data_field_sample_test_1.entity_type = 'commerce_product' AND field_data_field_sample_test_1.deleted = '0')
  LEFT JOIN {field_data_field_sample_test_2} field_data_field_sample_test_2 ON commerce_product.product_id = field_data_field_sample_test_2.entity_id AND (field_data_field_sample_test_2.entity_type = 'commerce_product' AND field_data_field_sample_test_2.deleted = '0')
  LEFT JOIN {field_data_field_sample_test_3} field_data_field_sample_test_3 ON commerce_product.product_id = field_data_field_sample_test_3.entity_id AND (field_data_field_sample_test_3.entity_type = 'commerce_product' AND field_data_field_sample_test_3.deleted = '0')
  LEFT JOIN {field_data_field_sample_test_data_1} field_data_field_sample_test_data_1 ON commerce_product.product_id = field_data_field_sample_test_data_1.entity_id AND (field_data_field_sample_test_data_1.entity_type = 'commerce_product' AND field_data_field_sample_test_data_1.deleted = '0')
  LEFT JOIN {field_data_field_sample_test_data_2} field_data_field_sample_test_data_2 ON commerce_product.product_id = field_data_field_sample_test_data_2.entity_id AND (field_data_field_sample_test_data_2.entity_type = 'commerce_product' AND field_data_field_sample_test_data_2.deleted = '0')
  LEFT JOIN {field_data_field_sample_test_data_3} field_data_field_sample_test_data_3 ON commerce_product.product_id = field_data_field_sample_test_data_3.entity_id AND (field_data_field_sample_test_data_3.entity_type = 'commerce_product' AND field_data_field_sample_test_data_3.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_1} field_data_field_additional_detail_1 ON commerce_product.product_id = field_data_field_additional_detail_1.entity_id AND (field_data_field_additional_detail_1.entity_type = 'commerce_product' AND field_data_field_additional_detail_1.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_2} field_data_field_additional_detail_2 ON commerce_product.product_id = field_data_field_additional_detail_2.entity_id AND (field_data_field_additional_detail_2.entity_type = 'commerce_product' AND field_data_field_additional_detail_2.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_3} field_data_field_additional_detail_3 ON commerce_product.product_id = field_data_field_additional_detail_3.entity_id AND (field_data_field_additional_detail_3.entity_type = 'commerce_product' AND field_data_field_additional_detail_3.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_4} field_data_field_additional_detail_4 ON commerce_product.product_id = field_data_field_additional_detail_4.entity_id AND (field_data_field_additional_detail_4.entity_type = 'commerce_product' AND field_data_field_additional_detail_4.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_5} field_data_field_additional_detail_5 ON commerce_product.product_id = field_data_field_additional_detail_5.entity_id AND (field_data_field_additional_detail_5.entity_type = 'commerce_product' AND field_data_field_additional_detail_5.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_6} field_data_field_additional_detail_6 ON commerce_product.product_id = field_data_field_additional_detail_6.entity_id AND (field_data_field_additional_detail_6.entity_type = 'commerce_product' AND field_data_field_additional_detail_6.deleted = '0')
  LEFT JOIN {field_data_field_additional_detail_7} field_data_field_additional_detail_7 ON commerce_product.product_id = field_data_field_additional_detail_7.entity_id AND (field_data_field_additional_detail_7.entity_type = 'commerce_product' AND field_data_field_additional_detail_7.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_1} field_data_field_additional_data_1 ON commerce_product.product_id = field_data_field_additional_data_1.entity_id AND (field_data_field_additional_data_1.entity_type = 'commerce_product' AND field_data_field_additional_data_1.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_2} field_data_field_additional_data_2 ON commerce_product.product_id = field_data_field_additional_data_2.entity_id AND (field_data_field_additional_data_2.entity_type = 'commerce_product' AND field_data_field_additional_data_2.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_3} field_data_field_additional_data_3 ON commerce_product.product_id = field_data_field_additional_data_3.entity_id AND (field_data_field_additional_data_3.entity_type = 'commerce_product' AND field_data_field_additional_data_3.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_4} field_data_field_additional_data_4 ON commerce_product.product_id = field_data_field_additional_data_4.entity_id AND (field_data_field_additional_data_4.entity_type = 'commerce_product' AND field_data_field_additional_data_4.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_5} field_data_field_additional_data_5 ON commerce_product.product_id = field_data_field_additional_data_5.entity_id AND (field_data_field_additional_data_5.entity_type = 'commerce_product' AND field_data_field_additional_data_5.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_6} field_data_field_additional_data_6 ON commerce_product.product_id = field_data_field_additional_data_6.entity_id AND (field_data_field_additional_data_6.entity_type = 'commerce_product' AND field_data_field_additional_data_6.deleted = '0')
  LEFT JOIN {field_data_field_additional_data_7} field_data_field_additional_data_7 ON commerce_product.product_id = field_data_field_additional_data_7.entity_id AND (field_data_field_additional_data_7.entity_type = 'commerce_product' AND field_data_field_additional_data_7.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_1} field_data_field_additional_information_1 ON commerce_product.product_id = field_data_field_additional_information_1.entity_id AND (field_data_field_additional_information_1.entity_type = 'commerce_product' AND field_data_field_additional_information_1.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_2} field_data_field_additional_information_2 ON commerce_product.product_id = field_data_field_additional_information_2.entity_id AND (field_data_field_additional_information_2.entity_type = 'commerce_product' AND field_data_field_additional_information_2.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_3} field_data_field_additional_information_3 ON commerce_product.product_id = field_data_field_additional_information_3.entity_id AND (field_data_field_additional_information_3.entity_type = 'commerce_product' AND field_data_field_additional_information_3.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_4} field_data_field_additional_information_4 ON commerce_product.product_id = field_data_field_additional_information_4.entity_id AND (field_data_field_additional_information_4.entity_type = 'commerce_product' AND field_data_field_additional_information_4.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_5} field_data_field_additional_information_5 ON commerce_product.product_id = field_data_field_additional_information_5.entity_id AND (field_data_field_additional_information_5.entity_type = 'commerce_product' AND field_data_field_additional_information_5.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_6} field_data_field_additional_information_6 ON commerce_product.product_id = field_data_field_additional_information_6.entity_id AND (field_data_field_additional_information_6.entity_type = 'commerce_product' AND field_data_field_additional_information_6.deleted = '0')
  LEFT JOIN {field_data_field_additional_information_7} field_data_field_additional_information_7 ON commerce_product.product_id = field_data_field_additional_information_7.entity_id AND (field_data_field_additional_information_7.entity_type = 'commerce_product' AND field_data_field_additional_information_7.deleted = '0')
  LEFT JOIN {taxonomy_vocabulary} taxonomy_term_data_field_data_field_sample_name__taxonomy_vocabulary ON taxonomy_term_data_field_data_field_sample_name.vid = taxonomy_term_data_field_data_field_sample_name__taxonomy_vocabulary.vid
  LEFT JOIN {taxonomy_vocabulary} taxonomy_term_data_field_data_field_sample_origin__taxonomy_vocabulary ON taxonomy_term_data_field_data_field_sample_origin.vid = taxonomy_term_data_field_data_field_sample_origin__taxonomy_vocabulary.vid
  LEFT JOIN {taxonomy_vocabulary} taxonomy_term_data_field_data_field_sample_matrix__taxonomy_vocabulary ON taxonomy_term_data_field_data_field_sample_matrix.vid = taxonomy_term_data_field_data_field_sample_matrix__taxonomy_vocabulary.vid
  LEFT JOIN {taxonomy_vocabulary} taxonomy_term_data_field_data_field_sample_volume__taxonomy_vocabulary ON taxonomy_term_data_field_data_field_sample_volume.vid = taxonomy_term_data_field_data_field_sample_volume__taxonomy_vocabulary.vid
  WHERE (( (taxonomy_term_data_field_data_field_sample_category.tid = '1510' ) AND (taxonomy_term_data_field_data_field_sample_name.tid = '1001' ) )AND(( (commerce_product.status &lt;&gt; '0') AND (field_data_commerce_stock.commerce_stock_value &gt; '0') AND (field_data_field_qc_sample_verified.field_qc_sample_verified_value = '1') )))
  ORDER BY commerce_product_sku DESC
  </code></pre>
  
  <p><strong>Variables Diff</strong></p>
  
  <pre><code>"&gt; = MariadB"
  "&lt; = MySQL"
  
  &gt; | aria_block_size | 8192|
  &gt; | aria_checkpoint_interval| 30|
  &gt; | aria_checkpoint_log_activity| 1048576 |
  &gt; | aria_force_start_after_recovery_failures| 0 |
  &gt; | aria_group_commit | none|
  &gt; | aria_group_commit_interval| 0 |
  &gt; | aria_log_file_size| 1073741824|
  &gt; | aria_log_purge_type | immediate |
  &gt; | aria_max_sort_file_size | 9223372036853727232 |
  &gt; | aria_page_checksum| ON|
  &gt; | aria_pagecache_age_threshold| 300 |
  &gt; | aria_pagecache_buffer_size| 134217728 |
  &gt; | aria_pagecache_division_limit | 100 |
  &gt; | aria_recover| NORMAL|
  &gt; | aria_repair_threads | 1 |
  &gt; | aria_sort_buffer_size | 134217728 |
  &gt; | aria_stats_method | nulls_unequal |
  &gt; | aria_sync_log_dir | NEWFILE |
  &gt; | aria_used_for_temp_tables | ON|
  &gt; | binlog_annotate_row_events| OFF |
  &gt; | binlog_checksum | NONE|
  &gt; | binlog_optimize_thread_scheduling | ON|
  &lt; | character_set_database| latin1 |
  &gt; | character_set_database| utf8|
  &lt; | collation_database| latin1_swedish_ci|
  &gt; | collation_database| utf8_general_ci |
  &gt; | deadlock_search_depth_long| 15|
  &gt; | deadlock_search_depth_short | 4 |
  &gt; | deadlock_timeout_long | 50000000|
  &gt; | deadlock_timeout_short| 10000 |
  &gt; | debug_no_thread_alarm | OFF |
  &lt; | engine_condition_pushdown | ON |
  &gt; | engine_condition_pushdown | OFF |
  &lt; | expire_logs_days| 10 |
  &gt; | expensive_subquery_limit| 100 |
  &gt; | expire_logs_days| 0 |
  &gt; | extra_max_connections | 1 |
  &gt; | extra_port| 0 |
  &lt; | have_symlink| YES|
  &gt; | have_symlink| DISABLED|
  &gt; | ignore_db_dirs| |
  &gt; | in_transaction| 0 |
  &gt; | innodb_adaptive_flushing_method | estimate|
  &gt; | innodb_adaptive_hash_index_partitions | 1 |
  &gt; | innodb_blocking_buffer_pool_restore | OFF |
  &gt; | innodb_buffer_pool_populate | OFF |
  &gt; | innodb_buffer_pool_restore_at_startup | 0 |
  &gt; | innodb_buffer_pool_shm_checksum | ON|
  &gt; | innodb_buffer_pool_shm_key| 0 |
  &gt; | innodb_checkpoint_age_target| 0 |
  &gt; | innodb_corrupt_table_action | assert|
  &gt; | innodb_dict_size_limit| 0 |
  &gt; | innodb_doublewrite_file | |
  &gt; | innodb_fake_changes | OFF |
  &gt; | innodb_fast_checksum| OFF |
  &lt; | innodb_flush_log_at_trx_commit| 1|
  &gt; | innodb_flush_log_at_trx_commit| 2 |
  &gt; | innodb_flush_neighbor_pages | area|
  &gt; | innodb_ibuf_accel_rate| 100 |
  &gt; | innodb_ibuf_active_contract | 1 |
  &gt; | innodb_ibuf_max_size| 67092480|
  &gt; | innodb_import_table_from_xtrabackup | 0 |
  &gt; | innodb_kill_idle_transaction| 0 |
  &lt; | innodb_lock_wait_timeout| 50 |
  &gt; | innodb_lazy_drop_table| 0 |
  &gt; | innodb_lock_wait_timeout| 180 |
  &gt; | innodb_locking_fake_changes | ON|
  &gt; | innodb_log_block_size | 512 |
  &gt; | innodb_max_bitmap_file_size | 104857600 |
  &gt; | innodb_max_changed_pages| 1000000 |
  &gt; | innodb_merge_sort_block_size| 1048576 |
  &gt; | innodb_page_size| 16384 |
  &lt; | innodb_purge_threads| 0|
  &gt; | innodb_purge_threads| 1 |
  &gt; | innodb_read_ahead | linear|
  &gt; | innodb_recovery_stats | OFF |
  &gt; | innodb_recovery_update_relay_log| OFF |
  &gt; | innodb_show_locks_held| 10|
  &gt; | innodb_show_verbose_locks | 0 |
  &gt; | innodb_simulate_comp_failures | 0 |
  &gt; | innodb_stats_auto_update| 1 |
  &gt; | innodb_stats_modified_counter | 0 |
  &gt; | innodb_stats_traditional| ON|
  &gt; | innodb_stats_update_need_lock | 1 |
  &gt; | innodb_thread_concurrency_timer_based | OFF |
  &gt; | innodb_track_changed_pages| OFF |
  &gt; | innodb_use_atomic_writes| OFF |
  &gt; | innodb_use_fallocate| OFF |
  &gt; | innodb_use_global_flush_log_at_trx_commit | ON|
  &gt; | innodb_use_stacktrace | OFF |
  &lt; | innodb_version| 5.5.57 |
  &gt; | innodb_use_sys_stats_table| OFF |
  &gt; | innodb_version| 5.5.52-MariaDB-38.3 |
  &lt; | interactive_timeout | 28800|
  &lt; | join_buffer_size| 131072 |
  &gt; | interactive_timeout | 25|
  &gt; | join_buffer_size| 2097152 |
  &gt; | join_buffer_space_limit | 2097152 |
  &gt; | join_cache_level| 2 |
  &lt; | key_buffer_size | 16777216 |
  &gt; | key_buffer_size | 268435456 |
  &gt; | key_cache_segments| 0 |
  &gt; | lc_messages_dir | |
  &lt; | long_query_time | 2.000000 |
  &gt; | long_query_time | 10.000000 |
  &lt; | max_allowed_packet| 1073741824 |
  &gt; | master_verify_checksum| OFF |
  &gt; | max_allowed_packet| 16777216|
  &lt; | max_binlog_size | 104857600|
  &gt; | max_binlog_size | 1073741824|
  &lt; | max_connect_errors| 10 |
  &lt; | max_connections | 151|
  &gt; | max_connect_errors| 1000|
  &gt; | max_connections | 150 |
  &lt; | max_long_data_size| 1073741824 |
  &gt; | max_long_data_size| 16777216|
  &lt; | max_user_connections| 0|
  &gt; | max_user_connections| 150 |
  &gt; | mrr_buffer_size | 262144|
  &gt; | myisam_block_size | 1024|
  &lt; | myisam_max_sort_file_size | 2146435072 |
  &lt; | myisam_mmap_size| 4294967295 |
  &lt; | myisam_recover_options| BACKUP |
  &gt; | myisam_max_sort_file_size | 9223372036853727232 |
  &gt; | myisam_mmap_size| 18446744073709551615|
  &gt; | myisam_recover_options| DEFAULT |
  &lt; | myisam_sort_buffer_size | 8388608|
  &gt; | myisam_sort_buffer_size | 67108864|
  &lt; | new | OFF|
  &gt; | old_mode| |
  &lt; | optimizer_switch| index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on |
  &gt; | optimizer_switch| index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off |
  &gt; | query_cache_strip_comments| OFF |
  &lt; | read_buffer_size| 131072 |
  &gt; | read_buffer_size| 1048576 |
  &lt; | read_rnd_buffer_size| 262144 |
  &gt; | read_rnd_buffer_size| 4194304 |
  &gt; | replicate_annotate_row_events | OFF |
  &gt; | replicate_do_db | |
  &gt; | replicate_do_table| |
  &gt; | replicate_events_marked_for_skip| replicate |
  &gt; | replicate_ignore_db | |
  &gt; | replicate_ignore_table| |
  &gt; | replicate_wild_do_table | |
  &gt; | replicate_wild_ignore_table | |
  &gt; | rowid_merge_buff_size | 8388608 |
  &gt; | secure_file_priv| |
  &gt; | skip_replication| OFF |
  &gt; | slave_sql_verify_checksum | ON|
  &lt; | slow_query_log| ON |
  &lt; | sort_buffer_size| 2097152|
  &gt; | slow_query_log| OFF |
  &gt; | sort_buffer_size| 1048576 |
  &lt; | table_open_cache| 400|
  &gt; | table_open_cache| 256 |
  &lt; | thread_stack| 196608 |
  &gt; | thread_pool_idle_timeout| 60|
  &gt; | thread_pool_max_threads | 500 |
  &gt; | thread_pool_oversubscribe | 3 |
  &gt; | thread_pool_size| 2 |
  &gt; | thread_pool_stall_limit | 500 |
  &gt; | thread_stack| 294912|
  &lt; | version | 5.5.57-0ubuntu0.14.04.1-log|
  &lt; | version_comment | (Ubuntu) |
  &lt; | version_compile_machine | i686 |
  &lt; | version_compile_os| debian-linux-gnu |
  &lt; | wait_timeout| 28800|
  &gt; | userstat| OFF |
  &gt; | version | 5.5.56-MariaDB|
  &gt; | version_comment | MariaDB Server|
  &gt; | version_compile_machine | x86_64|
  &gt; | version_compile_os| Linux |
  &gt; | wait_timeout| 25|
  </code></pre>
  
  <p>I realized now that this diff was probably before I added the following to the my.cnf file for MariaDB:</p>
  
  <pre><code>skip-external-locking
  key_buffer              = 16M
  key_buffer_size         = 256M
  max_allowed_packet      = 1024M
  table_open_cache        = 256
  sort_buffer_size        = 1M
  read_buffer_size        = 1M
  read_rnd_buffer_size    = 4M
  myisam_sort_buffer_size = 64M
  thread_stack            = 192K
  thread_cache_size       = 8
  query_cache_limit       = 1M
  query_cache_size        = 16M
  # Try number of CPU's*2 for thread_concurrency
  thread_concurrency      = 8
  </code></pre>