Form Entries Export Results in Empty CSV File

We recently updated Gravity Forms to Version 2.7.16 running on a Ubuntu 22.04 using PHP 8.0 and nginx. When we attempt to download our form entries in a csv file the file downloads empty.

I have attempted to follow all of the suggestions here, but nothing is resolving the issue.

The gravityform directory under uploads is set to writeable and the owner is the same that the site is running under in nginx and what PHP is set to run as.

I’ve enabled logging and see no logs being generated during the export.

Is the site running in a load balanced environment?

The way entry exporting works is that it uses Ajax requests to export the entries to the CSV file in small batches, to prevent timeouts, and then when the last batch is processed the file is downloaded.

If the site is using a load balanced setup that will result in each Ajax request being handled by a different server and so when the file is download it is possible for some or all of the data to be missing.

To get the entry exports working in a load balanced environment requires making a configuration change to the environment such as:

  • Restricting admin access to only one server.
  • Configuring the load balancer to handle requests to /wp-admin/admin-ajax.php from one server.

Yes we are using a load balancer. We’re in AWS and I just upgraded from a Classic ELB to an Application Load Balancer so that I could add a Web Application Firewall in. I did not have session stickiness turned on. I just turned that on and will give it a try in a few minutes and see if that resolves the issue.

Turning on session stickiness in the load balancer fixed the problem.

I’m surprised the load balancer was switching the session that quickly, but glad it was a simple configuration change.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.