This is a great module and we appreciates the authors and others who have helped in making such a wonderful module. Currently we have an issue and details are given below. Any help is appreciated.

We have upgraded our server with CENTOS 7.x , PHP5.6.15 and MySQL Server 5.6.27. After this, the batch process did not work. It goes in a locked position. We are not an expert in this background process module, how it works etc. However we tried our best to find what is causing the issue.

The following lines are executing at _background_batch_initiate function in the background_batch.pages.inc file at line 125 when it starts processing it bypass to else part of the following code and the process gets locked.

$handle = 'background_batch:' . $id;
if (!$process) {
$process = background_process_get_process($handle);
}

if ($process) {
// If batch is already in progress, goto to the status page instead of starting it.
if ($process->exec_status == BACKGROUND_PROCESS_STATUS_RUNNING) {
return $process;
}
// If process is locked and hasn't started for X seconds, then relaunch
if (
$process->exec_status == BACKGROUND_PROCESS_STATUS_LOCKED &&
$process->start_stamp + variable_get('background_process_redispatch_threshold', BACKGROUND_PROCESS_REDISPATCH_THRESHOLD) < time()
) {
$process = BackgroundProcess::load($process);
$process->dispatch();
}
return $process;
}
else {
// Hasn't run yet or has stopped. (re)start batch job.
$process = new BackgroundProcess($handle);
$process->service_host = 'background_batch';
if ($process->lock()) {
$message = $batch['sets'][0]['init_message'];
progress_initialize_progress('_' . $handle, $message);
if (function_exists('progress_set_progress_start')) {
progress_set_progress_start('_' . $handle, $batch['timestamp']);
}
else {
db_query("UPDATE {progress} SET start = :start WHERE name = :name", array(':start' => $batch['timestamp'], ':name' => '_' . $handle));
}
$result = $process->execute('_background_batch_process', array($id));
return $process;
}
}

Looking forward any help or pointer in resolving the issue.

Comments

sk2013 created an issue. See original summary.

sk2013’s picture

Issue summary: View changes