title: MySQL - Getting "Lock wait timeout exceeded; try restarting transaction"
body: <p>I have created one table with 4 columns in Oracle <code>MySQL</code> DB and the version 5.7. The total records present in DB is 4 912 442. Now i am trying to insert one more 100 000 records into the <code>MySQL</code> DB.</p>
  
  <p>I have created simple <code>Spring Boot</code> application and reading the records from file and inserting to the <code>MySQL</code> DB.</p>
  
  <p>Getting the below error while inserting records into <code>MySQL</code> DB after the records count 4912442 :</p>
  
  <pre><code>[WARN ] SqlExceptionHelper - SQL Error: 1205, SQLState: 40001
  [ERROR] SqlExceptionHelper - Lock wait timeout exceeded; try restarting transaction
  </code></pre>
  
  <p>Note: The MySQL DB is using in 2 instance by MASTER-MASTER Cluster.</p>
  
  <p>and also executed below commands even getting the above error :</p>
  
  <pre><code>SET GLOBAL innodb_lock_wait_timeout = 5000; 
  SET innodb_lock_wait_timeout = 5000;
  </code></pre>