contentful-cli icon indicating copy to clipboard operation
contentful-cli copied to clipboard

`contentful space import` is stuck

Open slash3b opened this issue 1 year ago • 6 comments

Expected Behavior

I expect contentful space import to not be stuck

Actual Behavior

Please see attached screenshot. After some time contentful space import is stuck. File that is being imported is relatively large ~800Mb.

Possible Solution

Steps to Reproduce

I am aiming to do a backup of the whole environment, so that later we can re-import.

  1. Do a full export with command (note environment name):
contentful space export --space-id=************ --environment-id=A --max-allowed-limit=300 --management-token=CFPAT-******************** --content-file=dump.json --include-drafts=true --use-verbose-renderer=true
  1. Observe json file is created when export finished its work.
  2. Size of a file is quite big ~800Mb
  3. Attempt to import with command(using another environment cloned from A):
contentful space import --space-id=******** --environment-id=B_env_cloned_from_A --content-file=dump.json --management-token=CFPAT-********* --skip-content-publishing=true
  1. Observe import being stuck. I let it run for oven an hour, and nothing changed 🤷 Screenshot 2023-07-06 at 16 41 51

Context

I am trying to do a full backup of environment for a given space. This backup is necessary for when something gets broken and we need to restore the whole environment. This is, of course, is to be used on production.

Environment

  • Language Version: node -v: v20.3.1
  • Package Manager Version: npm -v: 9.6.7
  • Browser Version: -
  • Operating System: Darwin Nostromo 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
  • Package Version: -
  • contentful-cli: installed with brew, version is 2.6.26

slash3b avatar Jul 06 '23 13:07 slash3b

I'm having a similar problem when importing. It gets stuck in Importing Assets step. It says Rate limit error occurred. Waiting for 1572 ms before retrying... but it never continues. Screenshot 2024-01-16 at 14 53 45

loolooii avatar Jan 16 '24 13:01 loolooii

~~I'm seeing the same issue as loolooii. It's stuck during the "Import Assets" step after a rate limit error occurred.~~

Update: Import actually continued and finished after waiting for a long time.

restfulhead avatar Jan 17 '24 16:01 restfulhead

@restfulhead how long are we talking about? Like an hour?

loolooii avatar Jan 18 '24 12:01 loolooii

@loolooii Maybe like 20 mins for 150 assets. Not sure, didn't time it. But 95% of the time is spent in the "rate limit waiting state". So either the rate limit is really low, or maybe there's a bug in the "waiting" code.

restfulhead avatar Jan 18 '24 14:01 restfulhead

Did anyone resolve this? I am having the same problem. I am moving over 3000 assets, so I can not wait 20min for 150 assets

GregerGu avatar May 28 '24 06:05 GregerGu

Also having the same problem. It's frustrating that the first party tool is misbehaving for something that seems quite common.

jonskeen avatar Jun 25 '24 21:06 jonskeen