i already increased the timings ... (to the extreme).... still it did not complete.
 
 
i also tried changing:
 
    
$iLimit = 30;
to 
 
    
$iLimit = 3000;
 
 
not sure it that would help, 
 
but the code on line 53:
 if ($iCounter >= $iLimit)
 
looked like it was only going to cycle 30 times....
 
 
------------------------------------
 
as an alternative, if i understand what was being done here:
 
    $aNewSizes = array(
        '_t.jpg' => array('w' => 240, 'h' => 240, 'square' => true),
        '_t_2x.jpg' => array('w' => 480, 'h' => 480, 'square' => true, 'new_file' => true),
    );
could this be done manually in ssh with a command like:
 
find . -name \*_t.jpg -exec convert -size '240x240' {} -resize '>240x240' {} \;
find . -name \*_t_2x.jpg -exec convert -size '480x480' {} -resize '>480x480' {} \;