[Bug]: Got 503 Error when export to EXCEL with FromView and records greater than 20000 #3565
Unanswered
kishan2030
asked this question in
Q&A
Replies: 2 comments 11 replies
-
If you run into timeouts/memory issues, FromView is not the right choice. Parsing the view costs a lot of time and memory and is only advised for small exports. Please use FromModel or FromCollection instead. |
Beta Was this translation helpful? Give feedback.
8 replies
-
Hi @patrickbrouwers I have the same issue despite using I have 12k rows and the following class def
What could be the issue? My memory_limit is 4G. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1
What version of Laravel are you using?
7
What version of PHP are you using?
8
Describe your issue
class OrderExport implements FromView
{
/**
* @return \Illuminate\Support\Collection
*/
protected $orders;
protected $products;
protected $total_quantity;
}
When Exporting to excel with records greater than 20000 and it provides 503 Service Unavailable error and is not able to use Queue in this.
How can the issue be reproduced?
return Excel::download(new OrderExport($new_data, $products), "Report " . $request->start_date . ' to ' . $request->end_date . ".xlsx");
What should be the expected behaviour?
File Should be downloaded
Beta Was this translation helpful? Give feedback.
All reactions