I have a script that saving the hundreds or thousands of nodes at one time and It is nearly impossible to manage it with
Batch API. When I am running my script it saying :
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16 bytes) in /home/staging-uls/www/sites/all/modules/token/token.module on line 461.
I set the memory using
ini_set('memory_limit','256M'). My script is still so long that showing the error. Is there any other way to do so?
What my script is doing exactly:
- It fetches a data from other site using cUrl. The data are articles, journals and some other user's data.
- After getting the data in XML format, it adds each content.