Not able to import the content this exports

Created on 28 February 2025, about 1 month ago

Problem/Motivation

As an administrator, I use the following drush command to export content:

drush content:export --entities=<the node id I want to export>

This command produces a file that is 176 MB in size. Which is ridiculously large IMO, but I kind of get it. Complex content can possible refer to other content that is also large. And when you consider that content can reference paragraphs, images, files, metadata... all kinds of stuff. The size can grow rather large.

Still, my site is configured to disallow any file uploads that are larger that 100MB so I can only execute the import with a drush command. And this size also means I can use the UI to export the content. I can't use the UI for any of it's intended purpose. Not Bulk Edit commands, nothing.

OK, so I try to import the exact same piece of content I just exported. I use this command:

drush content:import scs-export/<name of file>

I get this error:

Executing drush content:import scs-export/node-article-0ecc5f28-36c7-4ee4-a547-de150e3b39d3.yml

Killed

Is this module broken for everyone or just me?

πŸ› Bug report
Status

Active

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cosmicdreams
  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul
  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

    OK, the next thing I tried was:

    1. Create a "Simple" content type as simple as I can make it. I created a content type with just a body field.
    2. Create content using this simple content type.
    3. Export that using the drush content:export --entities=
    4. Import content using drush content:import scs-export/

    That succeeded but also included the error:

    Drupal\search_api\SearchApiException while trying to index items on Acquia Search Solr Index: Could not index items on index 'Acquia Search Solr Index' because pending server tasks could not be executed. in Drupal\search_api\Entity\Server->indexItems() (line 363 of /var/www/html/docroot/modules/contrib/search_api/src/Entity/Server.php). 
    

    Now, I have no evidence that my previous attempts were successful. I don't think it succeeded, didn't report its success, because of a search indexing error that occurred at the end.

    But the fact that import can succeed if the complexity of the import is small enough points to a resource allocation issue. Do we know roughly how much resources one would need to import the giant files that export process can produce?

  • πŸ‡ΊπŸ‡¦Ukraine nginex

    I've never seen that issue before, could you please try UI import and see if there are any errors

    /admin/content/import

  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

    I did this test:

    1. Create the simplest content type. A content type with a title and body field
    2. Create content with this CT
    3. Export the content using the command line.
    4. Import the content using the command line.

    That succeeded. So even in my case I can prove that the system works (if given enough resources)

    It is notable that the yaml file this export produced was about 63MB in size. (Uncompressed)

    When I Previously ran into trouble, the content I was exporting was 173 MB in size.

    After talking on slack with a few people, I've come to understand that this size is excessive. I would challenge you to test the size of your exports when working with content that has reference fields. I suspect that the export not only includes the content that was referenced (fully) but also the content that the reference references.

    That would explain why the size of the export balloons.

  • πŸ‡ΊπŸ‡¦Ukraine nginex

    I think for now you can try to apply a patch from from this issue πŸ› Handle potential exceptions on batch content import Active

    I was exporting and importing zip files over 500 mb, and didn’t have memory issues, maybe there is some kind of recursion issue that causes infinite loop.

    In any case, there is an issue that will optimize export ✨ Allow to partially export content Active , still need to find time to develop it

Production build 0.71.5 2024