pcntl_fork?
| From: | Peter Hoskin | Date: | Mon, 30 Jan 2006 11:33:36 +0000 |
| Subject: | pcntl_fork? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229461@lists.php.net to get a copy of this message | ||
Hi,
I have written a script to parse a large amount of XML data and insert it into SQL... deals with approx 80,000 rows each time I run it. I cannot successfully complete this script without running out of memory. Is pcntl_fork suitable to overcome this?
I have been playing with pcntl_fork and became completely stuck trying to select data from a database and spawn a new fork for each row. Later I'll have to use something like shmop so each child knows what row its working on, and will do a series of xml parsing based on supplied data.. a simple example of forking with a foreach this way would be appreciated
Regards,
Peter Hoskin