FriendsOfCake/cakephp-csvview

Out of memory,

vnt opened this issue · 6 comments

vnt commented

Hi,
how make to export big tables?
when export over 30000 records, I receive the error out of memory.

You'll need to give PHP more memory. I suggest running this export in the background and emailing the report.

I'm also having a out of memory error.
@josegonzalez I wonder is tere no way to limit the amount of used memory? (by sending the data before proces completion?) Not every server has memory freely available.

No, this is how CakePHP view rendering works. If you want to get around this, create the csv in the background and then send it to your users later.

vnt commented

Hi Josegonzalez,
how make to running export in the background?
Do you have an example for me?
Thanks so much.

You can either use a shell class or a queuing system.