CURL_EXEC - Allowed Memory Size of Bytes Exhausted

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 6
Joined: Tue Nov 30, 2010 2:39 am

Sat Oct 05, 2013 3:38 am


We are crawling data from third party web for my web purpose using curl method.
When we crawl almost 5000 data then it show below mentioned error in curl_exec($ch) function line.

Error : Allowed memory size of XXXXXXXXX bytes exhausted (tried to allocate XXXXXXXXX bytes) in php.

so please tell me how to reset curl function. :help: :help: :help: :help: :help:

Best Regards,
Pradeep Jangid

php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Sat Oct 12, 2013 12:38 am

One way - increase it using ini_set("memory_limit","30M");

Are you using a shared server? if "yes", then you need to change/add the entry in your .htaccess file.

Post Reply