1

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/drupal/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.

2 Answers 2

2

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.

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;
  1. DELETE FROM civicrm_user_job;

As always you should always backup your database before running any queries on it.

1
  • 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.
    – guyiac
    Commented May 24, 2023 at 15:21
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?

7
  • We see this table in civicrm : civicrm_status_pref but not _status_message this is logged in via phpmyadmin
    – Hardwick
    Commented Aug 25, 2022 at 18:53
  • 1
    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
    – eileen
    Commented Aug 26, 2022 at 20:24
  • @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! Commented Apr 9, 2023 at 23:30
  • @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! Commented Apr 9, 2023 at 23:33
  • @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
    – eileen
    Commented Apr 16, 2023 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.