laravel-datatables-docs icon indicating copy to clipboard operation
laravel-datatables-docs copied to clipboard

Returning huge amount of data causes memory size issue

Open jialeee17 opened this issue 1 year ago • 1 comments

Hello, I got the error when trying to return more than 10k+ of records. Error: "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted". Is there any solution for this instead of changing the "memory_limit" in php.ini?

jialeee17 avatar May 20 '24 04:05 jialeee17

Don't load all records at once. Use pagination via query and not collection.

yajra avatar May 20 '24 11:05 yajra