title: MySQL server going down on some queries
body: <p>We have a MySQL database hosted in a private SQL (OVH) with 256MB RAM (MySQL 5.7). The database size is 3 GB and we are using Innodb storage engine.</p>
  
  <p>The problem is that the server crashes on some queries without delay. We see the <code>Server has gone away</code> error.</p>
  
  <pre><code>SELECT `A`.* FROM `A` 
  LEFT JOIN `B` ON `A`.`IDB` = `B`.`ID` 
  WHERE ((`A`.`IDL`=74) 
  AND ((status in ("V","O") or (status = "C" and IDBy = 1)))) 
  AND (`B`.`IDL`=74) ORDER BY `B`.`note` DESC LIMIT 10
  </code></pre>
  
  <p>The A table contains ~60000 rows and the B table ~920000 rows.</p>
  
  <p>We had the same problem (the server to go down) with <code>Select count(*) from B</code>. So I converted it from InnoDB to MyISAM and now the count is good.</p>
  
  <p>The question is : Is it the size of the memory (256 MB) who is not sufficient for the database or is it some other reason?</p>