title: Error while sending STMT_PREPARE packet. PID=2
body: <p>I have no idea why I'm experiencing this bug.</p>
  
  <p>I have the following script:</p>
  
  <pre>
  foreach($brands as $brand){ // about 600items for this loop
      ....
      ....
      DB::table('mailing_list')->insert(array(
                          'email'     => $email,
                          'source'    => $source,
                          'source_url'=> $brand->external_url,
                          'facebook_url'  => $facebook_url,
                          'instagram_id'  => $instagram_username,
                          'instagram_url' => $instagram_url,
                          'instagram_followers'   => $instagram_followers
                      ));
  }
  </pre>
  
  <p>which breaks always at the same item</p>
  
  <pre>
  Error while sending STMT_PREPARE packet. PID=2 (SQL: insert into `mailing_list` (`email`, `source`, `source_url`, `facebook_url`, `instagram_id`, `instagram_url`, `instagram_followers`) values (some@email.com, source, www.url.com, https://www.facebook.com/url, some_username, http://instagram.com/url, 501))
  </pre>
  
  <p>Before I was getting 29 queries executed, now 34.</p>
  
  <p><strong>I would like to understand this error better</strong>: it might be the single entry breaking it, but even if the data I posted are gibberish the actual ones look fine to me.</p>
  
  <p><strong>WHAT I'VE TRIED:</strong></p>
  
  <pre>
  set_time_limit(3600);
  DB::connection()->disableQueryLog();
  DB::reconnect(Config::get('database.default')); // this one after each foreach loop
  </pre>