I have a php script that needs to run for quite some time.
What the script does:
Well, disregarding the fact that attempting 100,000 cURL requests is absolutely insane, you're probably hitting the memory limit.
Try setting the memory limit to something more reasonable:
ini_set('memory_limit', '256M');
And as a side tip, don't set the execution time to something ludicrous, chances are you'll eventually find a way to hit that with a script like this. ;]
Instead, just set it to 0, it functionally equivalent to turning the execution limit off completely:
ini_set('max_execution_time', 0);