Craft plugin controller for batch update users break with empty page I made a plugin to update my 3000 users. It is kind of a toolbox to manage and update some users fields.

I am calling the controller directly through its url action.
It is working basically but it stops after 20 seconds when updating too many users, and display a white page in browser, no results.  

I can see in my plugin log it updated some few lines before stopping.
I checked php and craft logs and cannot see any error information.

public function actionUsersFix() {

    // Delete all the entry caches
    craft()-&gt;templateCache-&gt;deleteCachesByElementType('User');

    // Now find the entry IDs
    $criteria = craft()-&gt;elements-&gt;getCriteria('User', array('group' =&gt; 'migMembers', 'limit' =&gt; null, 'status' =&gt; null, 'localeEnabled' =&gt; null));
    $criteria-&gt;group = 'migMembers';
    $criteria-&gt;limit = null;
    $criteria-&gt;status = null;
    $criteria-&gt;localeEnabled = null;
    $criteria-&gt;accent = '2';

    $userIds = $criteria-&gt;ids();
    //$totalEntries = count($userIds);

    //
    foreach ($userIds as $userId)
    {
        $user = craft()-&gt;users-&gt;getUserById($userId);

        $oldAccent = $user-&gt;accent;
        $newAccent = '3';

        $user-&gt;getContent()-&gt;accent = $newAccent;
        $success = craft()-&gt;users-&gt;saveUser($user);
        MigPlugin::log('User '.$user-&gt;email.' - accent = '. $oldAccent .' - modified = '.$newAccent, LogLevel::Warning);
    }

}
It was a php.ini config problem, I put some parameters values up and the update succeeded in less than 2 minutes and completed my users batch update.

So you just need to update the values below and reload your web server (ie: Apache).  

max_execution_time 120 (instead of initial value 30)  
memory_limit 512M (instead of initial value 128M)