-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long-running sfdx commands #2598
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
@Cheffromspace Thanks for posting the logs! I see Do you have anything out of the ordinary in Also, the config code needs to read both So I would try the following:
If either of those help, I'd be great if you could narrow down it down to a specific config var being present or if it's the |
Hi @mdonnalley Thank you for your response! The contents of both ~/.sf/config.json and ~/.sfdx/sfdx-config.json are I did rename the .sfdx/sfdx-config.json file. Interestingly my scripted consecutive runs now look like this, times are in seconds:
Reproducible: If I wait a minute or two, the first execution takes around 45 seconds while the rest take around 5. Note, I do a lot of work in WSL on the same computer and I'm not seeing any issues there. I use Powershell to run some scripts and was having issues with queries taking a VERY long time to execute. Thus the investigation. I have a function that I manually run from WSL to sync the .sfdx folders so I can use the same auth tokens in either shell that I thought could be contributing but I get the same result even after renaming the entire .sfdx folder in Powershell Log from a long execution
Log from short execution
|
Hi, is there anything else I can do to troubleshoot this? This definitely hasn't gotten any better, on the contrary. How can I find out what's happening during the lull here: 2023-12-07T14:58:51.111Z sf:@salesforce/cli:hooks:prerun start (import) C:\Program Files\sf\client\dist\hooks\prerun.js |
@Cheffromspace sorry for the late reply, this is first the prerun hook that gets called: then the telemetry one: and the
So 30s spent in that one, I would start digging into that file first. |
Summary
Running SF commands in powershell occasionally takes a considerable amount of time to run. Even very simple commands like 'sfdx version' which I would expect to run very quickly can take over a minute to run
Steps To Reproduce
Run the command 'sfdx version' (or any sf command)
Expected result
Output the results of the command to stout within a few hundred milliseconds
Actual result
Command will hang for up to 90 seconds. Looking at the logs it appears to hang primarily during the prerun hook of the @salesforce/plugin-telemetry. I have disabled telemetry globally yet the command continues to hang here.
System Information
Powershell 7
Execution times for 10 runs:
--dev-debug output
Telemetry log
The text was updated successfully, but these errors were encountered: