Answers.Body: <p>I'm embarassed to say, but though <code>drush cc all</code> (clear all caches) didn't work, once I ran <code>drush cc civicrm</code> the errors went away. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T03:59:41.290Z
Answers.Text: Your answer might still help others. We can also direct them to http://shouldiblamecaching.com/
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-29T11:50:49.247Z
Answers.Text: Others like us. +1
Answers.UserDisplayName: Francesc Bassas i Bullich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-27T20:05:11.570Z
Answers.Text: Should I just delete this question?
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-27T20:03:04.477Z
Answers.LastActivityDate: 2017-06-27T20:03:04.477Z
Answers.UserDisplayName: Christia
Body: <p>I haven't been working on the server or the website, but we are spontaneously getting the following error when sending a test mailing or scheduling a mailing:</p>
  
  <p>When sending a test mailing:</p>
  
  <blockquote>
    <p>Error in call to Mailing_send_test : Error in call to
    MailingJob_create : DB Error: unknown error</p>
  </blockquote>
  
  <p>When scheduling a mailing:</p>
  
  <blockquote>
    <p>DB Error: unknown error</p>
  </blockquote>
  
  <p>Here is the backtrace show with <code>drush ws</code>:</p>
  
  <pre><code>21021577  27/Jun 12:01  civicrm   debug     $backTrace = #0 /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(229):              
                                               CRM_Core_Error::backtrace("backTrace", TRUE)                                                                     
                                               #1 [internal function](): CRM_Core_Error::h                                                                      
   21021576  27/Jun 12:01  civicrm   debug     $Fatal Error Details = Array                                                                                     
                                               (                                                                                                                
                                                   [callback] =&gt; Array                                                                                          
                                                       (                                                                                                        
                                                           [0] =&gt; CRM_Core_Error                                                                                
                                                           [1] =&gt; handle                                                                                        
                                                       )                                                                                                        
  
                                                   [code] =&gt; -1                                                                                                 
                                                   [message] =&gt; DB Error: unknown                                                                               
   21021575  27/Jun 12:01  cron      notice    Cron run completed.                                                                                              
   21021574  27/Jun 12:01  civicrm   debug     $backTrace = #0 /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(229):              
                                               CRM_Core_Error::backtrace("backTrace", TRUE)                                                                     
                                               #1 [internal function](): CRM_Core_Error::h                                                                      
   21021573  27/Jun 12:01  civicrm   debug     $Fatal Error Details = Array                                                                                     
                                               (                                                                                                                
                                                   [callback] =&gt; Array                                                                                          
                                                       (                                                                                                        
                                                           [0] =&gt; CRM_Core_Error                                                                                
                                                           [1] =&gt; handle                                                                                        
                                                       )                                                                                                        
  
                                                   [code] =&gt; -1                                                                                                 
                                                   [message] =&gt; DB Error: unknown                                                                               
   21021572  27/Jun 12:01  civicrm   debug     $backTrace = #0 /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(229):              
                                               CRM_Core_Error::backtrace("backTrace", TRUE)                                                                     
                                               #1 [internal function](): CRM_Core_Error::h                                                                      
   21021571  27/Jun 12:01  civicrm   debug     $Fatal Error Details = Array                                                                                     
                                               (                                                                                                                
                                                   [callback] =&gt; Array                                                                                          
                                                       (                                                                                                        
                                                           [0] =&gt; CRM_Core_Error                                                                                
                                                           [1] =&gt; handle                                                                                        
                                                       )                                                                                                        
  
                                                   [code] =&gt; -1                                                                                                 
                                                   [message] =&gt; DB Error: unknown                                                                               
  </code></pre>
  
  <p>Also noted:
  Dashboard gives the following error:</p>
  
  <blockquote>
    <p>Unable to reach the server. Please refresh this page in your browser
    and try again.</p>
  </blockquote>
  
  <p>Using CiviCRM 4.7.15 and Drupal 7.50</p>
  
  <p>What I've tried:</p>
  
  <ul>
  <li>tested outbound SMTP settings <em>passed</em></li>
  <li>created a new mailing to test group only and scheduled it <em>passed</em></li>
  <li>recreated mailing to go out to same smart groups <em>failed</em></li>
  <li><code>drush cc all</code> <em>didn't take care of the issue</em></li>
  </ul>
  
Tags: <civimail><drupal><error>
Title: Mail error when sending to smart groups
ThreadText: # Mail error when sending to smart groups
  
  (Asked by: username_0 on 2017-06-27)
  
  I haven't been working on the server or the website, but we are spontaneously getting the following error when sending a test mailing or scheduling a mailing:
  
  When sending a test mailing:
  
  > Error in call to Mailing\_send\_test : Error in call to
  > MailingJob\_create : DB Error: unknown error
  
  When scheduling a mailing:
  
  > DB Error: unknown error
  
  Here is the backtrace show with `drush ws`:
  
  ```
  21021577  27/Jun 12:01  civicrm   debug     $backTrace = #0 /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(229):              
                                               CRM_Core_Error::backtrace("backTrace", TRUE)                                                                     
                                               #1 [internal function](): CRM_Core_Error::h                                                                      
   21021576  27/Jun 12:01  civicrm   debug     $Fatal Error Details = Array                                                                                     
                                               (                                                                                                                
                                                   [callback] => Array                                                                                          
                                                       (                                                                                                        
                                                           [0] => CRM_Core_Error                                                                                
                                                           [1] => handle                                                                                        
                                                       )                                                                                                        
  
                                                   [code] => -1                                                                                                 
                                                   [message] => DB Error: unknown                                                                               
   21021575  27/Jun 12:01  cron      notice    Cron run completed.                                                                                              
   21021574  27/Jun 12:01  civicrm   debug     $backTrace = #0 /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(229):              
                                               CRM_Core_Error::backtrace("backTrace", TRUE)                                                                     
                                               #1 [internal function](): CRM_Core_Error::h                                                                      
   21021573  27/Jun 12:01  civicrm   debug     $Fatal Error Details = Array                                                                                     
                                               (                                                                                                                
                                                   [callback] => Array                                                                                          
                                                       (                                                                                                        
                                                           [0] => CRM_Core_Error                                                                                
                                                           [1] => handle                                                                                        
                                                       )                                                                                                        
  
                                                   [code] => -1                                                                                                 
                                                   [message] => DB Error: unknown                                                                               
   21021572  27/Jun 12:01  civicrm   debug     $backTrace = #0 /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(229):              
                                               CRM_Core_Error::backtrace("backTrace", TRUE)                                                                     
                                               #1 [internal function](): CRM_Core_Error::h                                                                      
   21021571  27/Jun 12:01  civicrm   debug     $Fatal Error Details = Array                                                                                     
                                               (                                                                                                                
                                                   [callback] => Array                                                                                          
                                                       (                                                                                                        
                                                           [0] => CRM_Core_Error                                                                                
                                                           [1] => handle                                                                                        
                                                       )                                                                                                        
  
                                                   [code] => -1                                                                                                 
                                                   [message] => DB Error: unknown                                                                               
  
  ```
  
  Also noted:
  Dashboard gives the following error:
  
  > Unable to reach the server. Please refresh this page in your browser
  > and try again.
  
  Using CiviCRM 4.7.15 and Drupal 7.50
  
  What I've tried:
  
  * tested outbound SMTP settings *passed*
  * created a new mailing to test group only and scheduled it *passed*
  * recreated mailing to go out to same smart groups *failed*
  * `drush cc all` *didn't take care of the issue*
  
  **Tags:** civimail, drupal, error
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-06-27. Score: 4 | Accepted answer
  
  I'm embarassed to say, but though `drush cc all` (clear all caches) didn't work, once I ran `drush cc civicrm` the errors went away.
  
  > **Comments:**
  > **username_0**: Should I just delete this question?  
  > **username_1**: Your answer might still help others. We can also direct them to http://shouldiblamecaching.com/  
  > **username_2**: Others like us. +1  
  
  ---
  
  