yajra / laravel-datatables-docs

Laravel DaTatables package documentation
https://yajrabox.com/docs/laravel-datatables
91 stars 564 forks source link

Returning huge amount of data causes memory size issue #109

Open jialeee17 opened 2 months ago

jialeee17 commented 2 months ago

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?

yajra commented 2 months ago

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