Answers.Body: <p>I do not want to take credit for this solution because I worked with @eileen to do this. I do however want this to be easy for someone else to find.</p>
  <p>I ran the following queries and this issue (in my case for contact imports) was solved.</p>
  <p>1.</p>
  <pre><code>DELETE FROM civicrm_queue WHERE runner IS NULL;
  </code></pre>
  <ol start="2">
  <li>DELETE FROM civicrm_user_job;</li>
  </ol>
  <p>As always you should always backup your database before running any queries on it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-24T15:21:32.943Z
Answers.Text: Shouldn't number 2 be "DELETE FROM civicrm_user_job WHERE queue_id IS NULL"? That's what I used (after step 1) and this solution worked for me. We previously were getting the user job error message while trying to import contacts.
Answers.UserDisplayName: guyiac
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-22T22:10:34.750Z
Answers.LastActivityDate: 2023-04-22T22:10:34.750Z
Answers.UserDisplayName: Drupal Learner
Answers.Body: <p>If you have access to the database you should be able to find the created import temp table - if so - is the <code>_status_message</code> column populated?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-25T18:53:53.837Z
Answers.Text: We see this table in civicrm : civicrm_status_pref but not _status_message this is logged in via phpmyadmin
Answers.UserDisplayName: Hardwick
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-26T20:24:03.017Z
Answers.Text: So every import job created a temp table - something like `civicrm_tmp_d678ea,....` - and the name of that table can be found in the table `civicrm_user_job` - once you get to the version that is currently master it will be possible to see in the UI - but for now only in mysql
Answers.UserDisplayName: eileen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-09T23:30:39.140Z
Answers.Text: @eileen, I am having a very similar error here.  I am on Civi 5.58.1. I get CRM_Core_Exception: Cannot execute queue "user_job_X". The "civicrm_queue.runner" Where X goes up when try and do the import.  The _status_message in each newly created table for each attempt is empty.  I can see that a job is being created in the civicrm_user_job table.  Thanks!
Answers.UserDisplayName: Drupal Learner
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-09T23:33:44.833Z
Answers.Text: @eileen, When I leave the error and return to /civicrm (I am on Drupal I get a bubble message on the right that says "Cannot execute queue "user_job_5". The "civicrm_queue.runner" property is missing.".  Thanks!
Answers.UserDisplayName: Drupal Learner
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-16T23:50:30.667Z
Answers.Text: @DrupalLearner - that all seems a bit odd. One possibily is some lingering older entry in the civicrm_queue or civicrm_user_job table blocking newer jobs. Other than that - maybe jump on chat.civicrm.org (our mattermost channel) & we can try to get to the bottom of it
  
  Note that _status_message is only populated when an error occurs
Answers.UserDisplayName: eileen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-25T17:41:29.173Z
Answers.Text: Thanks DrupalLearner this worked for me. @eileen Why are these tables getting filled with rows that need deletion? Is there a task, button or process to clear out the civicrm_user_job and civicrm_queue tables other than a direct MySQL query?
Answers.UserDisplayName: CiviTeacher
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-28T22:29:35.327Z
Answers.Text: I'm not sure - I have not replicated it - but I think it is something to do with the upgrade or maybe something present but not a problem in older databases until they hit a certain version? If someone could find evidence it was the latter we could perhaps address in the upgrade script
Answers.UserDisplayName: eileen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-22T19:58:25.987Z
Answers.LastActivityDate: 2022-08-22T19:58:25.987Z
Answers.UserDisplayName: eileen
Body: <p>We recently upgraded all our sites running Civi 5.50 to 5.52. Now we cannot complete membership imports. We weren't timing out previously on data sets of up to 1,000, sometimes more. But now we cannot get past the &quot;queue runner&quot; screen. Checking the logs we see an ajax error of the type that it fails to complete or get to the next task.</p>
  <p>We've been reading through the notes on the latest commits herehttps://lab.civicrm.org/dev/core/-/issues/1031 as well as the documentation here : <a href="https://docs.civicrm.org/dev/en/latest/framework/queues" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/framework/queues</a>
  to try to figure out what could be going on.</p>
  <p>This appears to be a change that was made to the import process in 5.51 per the release notes <a href="https://civicrm.org/blog/dev-team/civicrm-551-release" rel="nofollow noreferrer">https://civicrm.org/blog/dev-team/civicrm-551-release</a></p>
  <p>interestingly, the contact imports seem to work even tho it hangs on the same screen.</p>
  <p>but the membership wont update or allow &quot;insert new.&quot;</p>
  <p>We see this error:</p>
  <blockquote>
  <p>$CRM_Queue_Page_AJAX_runNext_error = Exception: &quot;Failed to claim next task&quot; #3098
  -then-
  civicrm/CRM/Queue/Page/AJAX.php(36): CRM_Queue_Runner-&gt;runNext(TRUE) #1 (closed) civicrm/CRM/Queue/ErrorPolicy.php(89): CRM_Queue_Page_AJAX::{closure}() #2 (closed) civicrm/CRM/Queue/Page/AJAX.php(38): CRM_Queue_ErrorPolicy-&gt;call(Object(Closure)) #3 (closed) civicrm/CRM/Core/Invoke.php(285): CRM_Queue_Page_AJAX::runNext() #4 civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:17)) #5 civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4)) #6 (closed) civicrm/drupal/civicrm.module(471): CRM_Core_Invoke::invoke((Array:4)) #7 (closed)</p>
  </blockquote>
  <p>More details here: <a href="https://lab.civicrm.org/dev/core/-/issues/1031" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/1031</a></p>
  <p>is there something that needs to be enabled or installed to get the imports to run successfully and previously?</p>
  <p>Since we have multiple sites all using civimember - any assistance appreciated.</p>
  
Tags: <civimember><data-import>
Title: Membership Import Fails on Queue Runner After Upgrade to 5.52
ThreadText: # Membership Import Fails on Queue Runner After Upgrade to 5.52
  
  (Asked by: username_0 on 2022-08-19)
  
  We recently upgraded all our sites running Civi 5.50 to 5.52. Now we cannot complete membership imports. We weren't timing out previously on data sets of up to 1,000, sometimes more. But now we cannot get past the "queue runner" screen. Checking the logs we see an ajax error of the type that it fails to complete or get to the next task.
  
  We've been reading through the notes on the latest commits herehttps://lab.civicrm.org/dev/core/-/issues/1031 as well as the documentation here : <https://docs.civicrm.org/dev/en/latest/framework/queues>
  to try to figure out what could be going on.
  
  This appears to be a change that was made to the import process in 5.51 per the release notes <https://civicrm.org/blog/dev-team/civicrm-551-release>
  
  interestingly, the contact imports seem to work even tho it hangs on the same screen.
  
  but the membership wont update or allow "insert new."
  
  We see this error:
  
  > $CRM\_Queue\_Page\_AJAX\_runNext\_error = Exception: "Failed to claim next task" #3098
  > -then-
  > civicrm/CRM/Queue/Page/AJAX.php(36): CRM\_Queue\_Runner->runNext(TRUE) #1 (closed) civicrm/CRM/Queue/ErrorPolicy.php(89): CRM\_Queue\_Page\_AJAX::{closure}() #2 (closed) civicrm/CRM/Queue/Page/AJAX.php(38): CRM\_Queue\_ErrorPolicy->call(Object(Closure)) #3 (closed) civicrm/CRM/Core/Invoke.php(285): CRM\_Queue\_Page\_AJAX::runNext() #4 civicrm/CRM/Core/Invoke.php(69): CRM\_Core\_Invoke::runItem((Array:17)) #5 civicrm/CRM/Core/Invoke.php(36): CRM\_Core\_Invoke::\_invoke((Array:4)) #6 (closed) civicrm/username_1/civicrm.module(471): CRM\_Core\_Invoke::invoke((Array:4)) #7 (closed)
  
  More details here: <https://lab.civicrm.org/dev/core/-/issues/1031>
  
  is there something that needs to be enabled or installed to get the imports to run successfully and previously?
  
  Since we have multiple sites all using civimember - any assistance appreciated.
  
  **Tags:** civimember, data-import
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2023-04-22. Score: 2
  
  I do not want to take credit for this solution because I worked with @username_3 to do this. I do however want this to be easy for someone else to find.
  
  I ran the following queries and this issue (in my case for contact imports) was solved.
  
  1.
  
  ```
  DELETE FROM civicrm_queue WHERE runner IS NULL;
  
  ```
  
  2. DELETE FROM civicrm\_user\_job;
  
  As always you should always backup your database before running any queries on it.
  
  > **Comments:**
  > **username_2**: Shouldn't number 2 be "DELETE FROM civicrm_user_job WHERE queue_id IS NULL"? That's what I used (after step 1) and this solution worked for me. We previously were getting the user job error message while trying to import contacts.  
  
  ---
  
  ### Answer by username_3 on 2022-08-22. Score: 0
  
  If you have access to the database you should be able to find the created import temp table - if so - is the `_status_message` column populated?
  
  > **Comments:**
  > **username_0**: We see this table in civicrm : civicrm_status_pref but not _status_message this is logged in via phpmyadmin  
  > **username_3**: So every import job created a temp table - something like `civicrm_tmp_d678ea,....` - and the name of that table can be found in the table `civicrm_user_job` - once you get to the version that is currently master it will be possible to see in the UI - but for now only in mysql  
  > **username_1**: @username_3, I am having a very similar error here.  I am on Civi 5.58.1. I get CRM_Core_Exception: Cannot execute queue "user_job_X". The "civicrm_queue.runner" Where X goes up when try and do the import.  The _status_message in each newly created table for each attempt is empty.  I can see that a job is being created in the civicrm_user_job table.  Thanks!  
  > **username_1**: @username_3, When I leave the error and return to /civicrm (I am on username_1 I get a bubble message on the right that says "Cannot execute queue "user_job_5". The "civicrm_queue.runner" property is missing.".  Thanks!  
  > **username_3**: @username_1 - that all seems a bit odd. One possibily is some lingering older entry in the civicrm_queue or civicrm_user_job table blocking newer jobs. Other than that - maybe jump on chat.civicrm.org (our mattermost channel) & we can try to get to the bottom of it  Note that _status_message is only populated when an error occurs  
  > **username_4**: Thanks username_1 this worked for me. @username_3 Why are these tables getting filled with rows that need deletion? Is there a task, button or process to clear out the civicrm_user_job and civicrm_queue tables other than a direct MySQL query?  
  > **username_3**: I'm not sure - I have not replicated it - but I think it is something to do with the upgrade or maybe something present but not a problem in older databases until they hit a certain version? If someone could find evidence it was the latter we could perhaps address in the upgrade script  
  
  ---
  
  