Support

Home Forums Event Espresso Premium Fatal Error downloading CSV

Fatal Error downloading CSV

Posted: October 15, 2015 at 12:24 pm

Viewing 11 reply threads


Roberto Menendez

October 15, 2015 at 12:24 pm

I get a fatal error when trying to download my attendee CSV. Worked fine until I had 836 registers. After that, stopped working and I get this error:

Fatal error: Out of memory (allocated 135528448) (tried to allocate 56 bytes) in /homepages/0/d567740354/htdocs/app567742363/wp-includes/wp-db.php on line 2258
I added this: ini_set(‘max_execution_time’, 300); to my wp-config.php file

I Called my host to increase max_execution_time but can’t be done as it’s on a shared server.

Furthermore, I found this link: https://eventespresso.com/topic/csv-report-download-problem/#post-119066 and followed all the steps but my !wp-content/plugins/event-espresso-core/core/db_classes/EE_Export.class.php” does my file does not include this:

“”
$registrations = $reg_model->get_all(array(array(‘EVT_ID’=>$event_id),’order_by’=>array(‘Transaction.TXN_ID’=>’asc’,’REG_count’=>’asc’)));
and change it to
$registrations = $reg_model->get_all(array(array(‘EVT_ID’=>$event_id),’order_by’=>array(‘Transaction.TXN_ID’=>’asc’,’REG_count’=>’asc’), ‘limit’ => array(0,100)));
“”

So what can I do now? I’m very worried as I can’t download my attendee list and there are 4 days left for the event and I’m expecting 3.000 attendees.

Please let me know what I can do to download this info.

Running all the latest versions.

Thanks,

Roberto


Josh

  • Support Staff

October 15, 2015 at 12:42 pm

Hi Roberto,

Have you checked with your host to see if they can move you onto a VPS or another server where you have enough resources? The CSV report is a very resource intensive query, and while a shared host can be okay to use if you have a few hundred or so attendees for an event, we recommend moving to a server with enough resources when your needs exceed what a shared server with its limited resources can handle.


Roberto Menendez

October 15, 2015 at 12:56 pm

Yes, I’ve seen this option but I’m really scared about the migration process.

Is there anyway to download chunks of 500 attendees or similar? That would be cumbersome but OK for me.

SOS


Jonathan Wilson

October 15, 2015 at 1:04 pm

Hi Roberto,

Do you have FTP access to your WordPress files? If so, you should be able increase the PHP memory limit in wp-config.php file by adding this define( 'WP_MEMORY_LIMIT', '64M' );.


Jonathan Wilson

October 15, 2015 at 1:33 pm

Hey Roberto,

Check out this plugin that Tony from our support team developed. https://gist.github.com/Pebblo/976ed35816bd3b9a6d03

his function allows you to set a limit on th query, run the export to download X amount of records, then update the limit and run the export again to get the next ‘section’ of registrations and so on….


Roberto Menendez

October 15, 2015 at 3:46 pm

That plugin is one of the most wonderful things that I’ve seen lol.

Works perfectly!

Thanks a million to you and Tony.

Rob


Tony

  • Support Staff

October 16, 2015 at 1:24 am

Lol, you’re most welcome, Rob.

I’m glad it helped 🙂


Roberto Menendez

October 22, 2015 at 3:59 pm

Hi Tony,

I’m having a bit of trouble with the batch process.

I manage to get the first batch (0,900), but when I go for batch (901,1500) I get a gateway timeout or 500 internal server error.

what can be going on? first batch works, rest don’t.

Thanks,

Rob


Lorenzo Orlando Caum

  • Support Staff

October 23, 2015 at 5:39 am

Hi, could you increase the memory further by replacing the existing macro in your wp-config.php file with this one?

define( ‘WP_MEMORY_LIMIT’, ‘128M’ );

The above macro should be added towards the middle of the wp-config.php file.

Next, try reducing the number of records that are generated.

For example, try 901,1250


Lorenzo


Tony

  • Support Staff

October 23, 2015 at 6:16 am

Hi Rob,

My apologies, that’s because I’m giving you the wrong instructions!

I’m not sure what I was thinking previously, but changing both values will not work as that’s not how the query limit works. To explain…

The array uses (OFFSET, LIMIT) within the query:

OFFSET = the row to start FROM.
LIMIT = how many rows to pull, starting from the OFFSET value.

Meaning (0,900) starts at row 0 and pulls 900 rows.

(901,1500) says, “start at 901 and pull up to 1500 rows” which takes you over the amount of rows your server could handle.

So what you actually need to do is…

(0, 900) and Export = Pull 900 rows starting from row 0
(900,900) and Export = Pull another 900 rows starting from row 900
(1800, 900) and Export = Pull another 900 rows starting from row 1800….

The limit value (900) is how many rows to pull and make a ‘section’ of your report, the offset it where to start pull them rows from. You can use any other numbers you prefer, but you’ll want the limit value to be low enough for your server to handle but high enough that you don’t need to do very many exports to get all of your data.

That make sense?

Apologies for the mix up, I’ll get my gist updated to correct that information.


Roberto Menendez

October 23, 2015 at 2:16 pm

Hi Tony,

Thanks a million! Worked perfectly and I was able to download my data.

Important to know that I should go to a dedicated server asap but this was good enough to recover my data.

Rob


Lorenzo Orlando Caum

  • Support Staff

December 31, 2015 at 12:21 pm

Hello Roberto,

A current version of Event Espresso 4 introduces a batching feature where the records are retrieved in the background and then combined into one file. This will help with events with thousands of events.

You can see the changelog here:

https://eventespresso.com/wiki/ee4-changelog/

Be sure to backup your WordPress site (https://eventespresso.com/wiki/how-to-back-up-your-site/) before making changes.

If you have any other questions about Event Espresso 4, then please create a new support post in our support forums:

https://eventespresso.com/support/forums/

Thanks and have a happy new year!


Lorenzo

Viewing 11 reply threads

The support post ‘Fatal Error downloading CSV’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso