Return error 500 upon large datasets when exporting #4186
Replies: 1 comment
-
Just realize you cannot limit or offset using fromquery, my bad. It works accordingly |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When i am exporting to excel, i found out that if I cannot export to excel when my table has huge datasets (>100k rows) but it works fine with small datasets (<100 rows).
I am using FromQuery, and my query for both test case is as shown below
In my export class:
public function query() { return Store::query()->select('name')->limit(1); }
In my controller:
public function export() { return (new StoreExport)->download('store.xlsx'); }
I have tried to return the data by itself as a json response, and it does not different much in terms of getting query for small datasets or large datasets.
Do I need to adjust somewhere in the config file of excel.php or did I miss out any implementation in my code? What is the underlying mechanism because i cannot figure out why limit to 1 data will cause memory exhaustion?
Beta Was this translation helpful? Give feedback.
All reactions