Could someone please explain why sfdx commands,for example ( sfdx force:org:list ) takes a long time to respond. In my case it was ~50 seconds.

Could you please explain what is happening in the backend.


PS C:\Users\XXXXX> Measure-Command {sfdx force:org:list }

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 51
Milliseconds      : 563
Ticks             : 515639959
TotalDays         : 0.000596805508101852
TotalHours        : 0.0143233321944444
TotalMinutes      : 0.859399931666667
TotalSeconds      : 51.5639959
TotalMilliseconds : 51563.9959

Thanks in advance !

1 Answer 1


force:org:list actively refreshes every login/session ID to make sure it's still valid. This can take time if you have a ton of orgs logged in, or if you have network latency/bandwidth issues. Virtually all commands are subject to some kind of network activity, so if your network is slow, this would be the primary cause. From time to time, there may be other hiccups, but those tend to get resolved pretty quickly.

  • Thank you for the response .. appreciate it ! I donot think i have any network issue. However, i have tried this with different network spaces. What i meant for background activity is : does this command gives the output by connecting to any salesforce server.. or it gives result from my local machine as we authenticate our orgs with OAuth and tokens are saved locally. i have only 4 orgs logged in.
    – Sashi
    Commented Jan 18, 2019 at 12:52
  • I believe every time it check all locally stored orgs and confirms if those are accessible. I have added one org that expired a year ago, and after removing that, force:org:list started to give response in 8 seconds instead of 12 on average
    – kurunve
    Commented Jan 21, 2019 at 9:32

You must log in to answer this question.

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