How to Import CSV Data in Drupal 9 Webform?

Hi All,

I am facing issue in importing the csv data using webform in the Drupal 9 site hosted on Pantheon.
I am able to import more data in one go on DEV environtment but it fails on TEST and LIVE environments even with 100-200 rows of data due to timeout issue. The issue might be caused by the distributed nature of the appserver architecture on Live sites and it is a known issue.

Does any one have faced similar issue? Is there any workaround or alternate solutions to import the data to the site?

Do let me know if require any further imformation.


I’ve encountered this before when trying to export webform results from a live environment with multiple application servers. It had to do with the export batch process using the tmp folder and bouncing back and forth between application servers.

1 Like

Thanks for weighing on this, Brian! :pray: Prachi, let us know if you’re still experiencing issues/need help.

Thanks Brian for your response.
Can you please let me know how did you perform export in batch process or if you could share code snippet?
Please bare if you find it silly but I am kind of naive to Drupal.

I’m sorry, I’m not in a position to provide the solution anymore. This took me about a week to solve when I dealt with it 3 years ago, and I don’t have any records. I no longer work for the company where I did it, and it was a D7 site which was migrated to D8 after I solved that issue. I also had the assistance of Pantheon’s Diamond support in solving it.

What it boiled down to, though, was that I needed to patch the webform module’s code so that I could configure the temporary folder it was using while building the export, which meant digging into the webform module code. I then configured it to use a temporary folder within /files, like /files/tmp, instead of just /tmp which the webform module was using without the patch.

The following isn’t a great solution, but I think cloning the live database to dev, or a multidev, and exporting from there should get around the problem. Patching the webform module as above is how I got it working in the live environment.

1 Like

Thanks Brian for the explaination. I really appreciate.
I’ll give a try to patch the webform module code.
The solution of cloning the live databse to lower environment is not the option since the export option is enabled for user. The user either export the whole content into csv or filter the data and then export.

1 Like