I’m working on a personal project which involves several large PHP executions. I wanted to discuss this at high level to determine the optimal way to handle the problem.
The script I’m working on has a long execution time (potentially minutes due to a large number of http connections). When building this script I’ve into a couple of design problems:
- How do I prevent the script from running out of memory or timing out besides changing the memory/timeout limits in the php.ini. In other words, how can I chunk the requests. Cron jobs? Or is there another way to manage executing the php script in chunks.