I have code that reads an XML file and uses it to create and update objects. The problem is that I need it to create/update 12,000 objects at a time. How can I use batch database inserts in Elgg to handle this? Or is there another way (that doesn't time out)?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Dracolyte@Dracolyte
Dracolyte - 0 likes
You must log in to post replies.Time outs are not a problem so far as I know as that can be extended with the php set_time_limit() function.
A larger concern is memory leaks in core Elgg. I have found that doing more than a few hundred large profile inserts at once consumes too much memory. I know Brett was looking into this a while back but for now, I suggest that you structure your code as a cron job that does a few hundred inserts at a time. Probably 500 would be safe.
Thanks very much for the insights and suggestions!