Jump to content

rebuild posts - one post stays blocked


jesuralem

Recommended Posts

Hi,

I am finally running my migration on my production site. For some reason, the posts rebuild tasks keeps showing the same post number (27512 / 1316785), is there any way to make it skip this post or anything ? I my be wrong but i think this slows donw the rebuild as one of the threads may be stucked on it...

Link to comment
Share on other sites

I get the same problems (with the slow conversion of big sites) and have some helper tools for them. One tool is for background queues. I have a sh script, which runs php file in the cycle.

#!/bin/bash

while [ true ]
do
  /usr/bin/php -d memory_limit=-1 -d max_execution_time=0 $HOME/path/to/task.php
  echo 'Task executed'
  sleep 1
done

And the task.php file

<?php
require 'path/to/init.php';

$queueTask = \IPS\Task::load('queue', 'key')->run();
var_dump($queueTask);

Of course, this script might be in one php file. But in my original helpers, it does not have only one function. I just strip unnecessary other parts which are out of this topic. var_dump additionally can write an exception to the console if something goes wrong. You may run them in the background with piping stdout into the log file. Anyway, if you wanna use them - it's a good starting point for solving your problem with slow background queues.

My experience that this task finishes background conversion to one day from over the week. Another potential helpful part is increasing REBUILD_SLOW constant (it used to define the batch of each background queue). Typically I prefer to set it to 150. If you understand what value might be good for your environment (depends on performance) - you can tune it for yourself.

It set up in the constants.php file in that way:

<?php
// your constants variables here

\define( 'REBUILD_SLOW', 150 );


 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...