I have an Unlocked Package with many dependencies. Its creating takes more than 30 minutes.

My Backend code is polling every 5 seconds using

sfdx force:package:version:create:report --json --packagecreaterequestid 08c...3AAK

and after a while it's failing with this error

Timeout exceeded, while waiting for force:package:version:create:report response

What am I doing wrong?

  1. Is the polling frequency too high?
  2. What is a recommended frequency?
  3. Are the limits I am running in documented anywhere?

1 Answer 1


Is the polling frequency too high?

Most likely, yes. I do remember having problems with being impatient before I discovered force:package:version:create --wait.

What is a recommended frequency?

force:package:version:create --wait sleeps in 30 second intervals. I'd consider this a recommended strategy.

Are the limits I am running in documented anywhere?

Not that I'm aware of, but generally polling every five seconds in Salesforce is not ideal.

  • We are trying to use wait but I will keep this open and wait for answers that explain what limits were run into AND why there is the need for a polling report command when there is a wait param. Dec 10, 2020 at 11:42
  • The wait param other then I remember AND it is documented requires a numeric minute value. If I put 60 there and package creation takes 2h it will not work. So I think polling is the better more scalable approach. Dec 10, 2020 at 17:54
  • 1
    @RobertSösemann Maybe. I've always just set to 100, haven't had a problem yet, and that was with 10k+ elements in the package. Still, I think 30 seconds between checks is probably reasonable, since that's what the CLI does. Hopefully we'll get a response from Wade or someone today.
    – sfdcfox
    Dec 10, 2020 at 18:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .