title: Lost connection to MySQL server during query - codeigniter
body: <p>I just made a script in codeigniter which fetches emails and displays them with php imap.
  It fetches 500 mails at once no problem.
  If i try to fetch about 2000 mails at once, it throws an error.</p>
  
  <blockquote>
    <p>A Database Error Occurred
    Error Number: 2013</p>
    
    <p>Lost connection to MySQL server during query</p>
    
    <p>SELECT GET_LOCK('77dfd862ae2b7bedaec521bc4c3651952b56e6c9', 300) AS
    ci_session_lock</p>
    
    <p>Filename: libraries/Session/drivers/Session_database_driver.php</p>
    
    <p>Line Number: 358</p>
  </blockquote>
  
  <p>This project is live on hostgator. I am not sure if it has mysql workbench or not.
  I have no idea where it comes from and why.
  I have done nothing with mysql in codeigniter before.</p>
  
  <p>I do not know which file to edit and where to start. Please help.</p>