Allowed memory size of xxxxxxxxxx bytes exhausted (tried to allocate 8192 bytes)-PHP内存溢出问题
php程序在执行几万条的数据查询,插入,更新时,报错Allowed memory size of 2147483648 bytes exhausted (tried to allocate 8192 bytes),
错误原因:
php内存溢出:程序运行所需的内存,超出了配置(php.ini)限制。
解决方式:
直接在被调用方法开头添加
ini_set(‘max_execution_time’,7200);
ini_set(‘memory_limit’,-1);
C(‘REST_TIMEOUT’,360);
public function insertTransferDetail()
{
ini_set