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.
ini_set(..)
, as your previous question suggests you couldn't add this anywhere where it would work.page calback
function. I am updating my question with requirement.Curl
Request usingBatch API
. Each time my script runs It fetches the data for Different Researcher. I have a content type ofResearcher
.