Jump to content

Community

rebuild posts - one post stays blocked


jesuralem
 Share

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 );


 

Edited by Upgradeovec
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy