Hi,
I had a similar problem (on Moodle 2.9) with CAS authentication, launching moodle/auth/cas/cli/sync_users.php, exactly like in this thread.
Problem resolved using more PHP memory (512M to 1024M in my case ; memory_limit=1024M) to execute this script
Séverin