I want to fire import from Excel file by queues so I do:
queue file
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Excel::filter('chunk')->load(storage_path('engine-valves.xlsx'))->chunk(500, function($results) {
\Illuminate\Support\Facades\File::put(storage_path('data2.txt'), json_encode($results));
});
}
but on listen process I getting standard error Allowed memory size of xxx bytes exhausted. For one moment I tried to set ini_set('memory_limit', '-1'); but still I getting this error. There is full line with this error:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 100663304 bytes) in [app_path]\vendor\phpoffice\phpexcel\Classes\PHPExcel\Cell.php on line 889.
I'm using: https://github.com/Maatwebsite/Laravel-Excel
Where is can be problem?