Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Maatwebsite\Excel\Jobs\AppendQueryToSheet has been attempted too many times. #4101

Closed
1 task done
EranNL opened this issue Mar 7, 2024 · 1 comment
Closed
1 task done
Labels

Comments

@EranNL
Copy link

EranNL commented Mar 7, 2024

Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?

  • Yes, it's still reproducable

What version of Laravel Excel are you using?

3.1.55

What version of Laravel are you using?

10.45.1

What version of PHP are you using?

8.2

Describe your issue

When exporting 35k models the jobs fail because of a memory exceeded exception. I am using a queued export with chunk size 3000. It fails on page 8, so it processed around 24k lines.
In the export, there are around 5 columns, so the amount of data in the file is not overly big.

Perhaps it is worth noticing that the execution time of the job gets longer with each job. Running locally:
afbeelding
and eventually it stops because it uses too much memory. I have a feeling this is caused when reopening the cached excel file (depending on the writer type of course).

How can the issue be reproduced?

Import a file with a lot of models. Furthermore, I am using the following concerns:

 FromQuery, ShouldQueue, WithCustomChunkSize

What should be the expected behaviour?

I should just export the whole file and complete all chained jobs

@EranNL EranNL added the bug label Mar 7, 2024
@patrickbrouwers
Copy link
Member

Just wrap the export in your own queue job and put it on a long running queue. Queue-Chunking is unfortunatly not possible without increasing memory on each job when using xlsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants