-
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
SFDX creates enormous log files on my boot drive #1408
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. |
Yeah, I saw the same thing. My log file was 333 GB and I deleted it just yesterday. Granted it had been approximately 2 months since I last purged that log file, but it was surprising to see it grow that much in such a short time. |
Yeesh, thanks for bringing this up. Do either of you have @klivian Are you saying that you got a 93.1GB log file in a single week? How long have you been working with @ImJohnMDaniel Are you also on Windows? For how long have you been aware of and occasionally clearing this file? |
I am on MacOS. I don't have |
Yea, 333GB is huge. Thanks for the additional info. I'll look into it. |
Hey @ImJohnMDaniel, could you run this to see if there is a single message that is especially noisy? This won't account for logs with small variations, but it's a good start to rule out something obvious. You'll need jq installed if you don't already. @klivian, this might work for you if you are using WSL or GitBash on your machine. I've not tested it though
|
Same issue here on Windows (more than 98GB), I tried to update sfdx (two versions) but nothing changed. |
Just back to this after a few days off - no SFDX_LOG_LEVEL set, output from the jq command :- 5 {"name":"sfdx","hostname":"WINDOWS-N6U49BG","log":null,"msg":""} |
@iowillhoit, here is the jq output requested. Having said that, this was run on the current sfdx.log; not the large one that I deleted last week. I purged that from the recycle bin already |
Ok, thanks everyone. Was hoping we'd see something obvious. I will ask internally to see if I can find a large log file to look over. |
just came across this today as well - 360 gig log file. I purged it before analyzing (sorry) - will keep an eye open for how it grows over the next while and provide better information if it repeats. |
Hey @JonnyPower, no worries about deleting it. It's looking likely that we will be implementing a rotating log file to prevent these huge files in the future. Will post back here once it's released or if our plans change 👍 |
This issue has been linked to a new work item: W-10745422 |
@iowillhoit - as part of the work on this, could I ask (if it isn't already planned) whether there could be a way to configure the storage location for the log file(s) ? I have ample space on my other drive but to the best of my knowledge, no way of telling SFDX to use it. |
I had setup SFDX on my current machine back in July. At the beginning of February my log file was over 800GB. I am glad to know that this is being addressed |
A change to implement a rotating file log has been released in today's release candidate ( |
@iowillhoit Been testing since 7.144.0 RC (now on 7.144.2 as of a few minutes ago) - log sizes dramatically reduced. I have sfdx.log at 3kb, sfdx.log.0 at 0kb and the new sf.log (in it's new directory) also at 0kb. Will continue to monitor until we go from RC to GA on this version |
That's great! Thank you for testing it out @klivian |
I've had the same issue pop up again, this time in the ~/.sf folder - again sf logs are taking up upwards of 200 GB before my storage maxes out. Should I file a separate issue? |
@iowillhoit I just updated SFDX in our azure pipeline, which runs every night to run all tests in our partialcopy org. I fear that this change has caused an issue for long-running commands that pass the 00:00h time mark:
You can see exactly at 00:00:00 errors are being generated, which result in the entire pipeline failing. This change in log-rotation seems to be the cause. The pipeline in question usually runs about 5 hours, starting at 8pm GMT, finishing around 1am GMT. But now the pipeline immediately fails at 00:00. |
The script
|
So we have a similar problem, but with sf/sf.log file.
And consumes all available space. |
Is there a follow-up to KacperAugustyniak's comment? We are also seeing this same bug take place in the |
@austin-convoy did you try the workaround mentioned in issue #1706? set SFDX_LOG_ROTATION_PERIOD=1w |
@austin-convoy We recently found out what was causing the enormous logs in our case. I hope this will help you find a solution to your problem. |
@peternhale will this help with .sf logs instead of .sfdx logs? |
@couturecraigj Not sure what you are asking? |
This
This was originally about an issue with |
@couturecraigj thank you. The sf command is using the same log rotation logic as sfdx. Which version of sf are you using? Have you eliminated the possibility of orphaned processes as a source of log file growth? |
@peternhale I have not orphaned any processes that I can identify as I wait for all of them to complete |
I had this same issue. Was very confused as to how I was randomly running out of hard drive space. I've only been using SFDX to complete some trails for a week and it already ballooned to 33GB. There definitely seems to be some erratic logging going on here. There should at least be some config that can be used to set a max log file size. |
FWIW, I just deleted a 335GB log file on MacOS. I never adjusted the log level from whatever the default is. Unfortunately, I don't now if this started to slow in growth recently. I deleted the file and will monitor. |
Summary
SFDX creates many gigabytes of logfiles on my primary boot drive, causing the drive to run out of space
Steps To Reproduce:
**NB: This is not a repository-specific issue. Let me know if cli isn't the right repo for this
%USERPROFILE%/.sfdx
folderExpected result
Should exist, but not be tens or hundreds of gigabytes in size
Actual result
This week it was 93.1gb in size. When I first discovered this issue on Jan 19th - 103.5gb
System Information
{
"cliVersion": "sfdx-cli/7.136.2",
"architecture": "win32-x64",
"nodeVersion": "node-v16.13.2",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.3.1 (core)",
"@oclif/plugin-not-found 1.2.6 (core)",
"@oclif/plugin-plugins 1.10.11 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-warn-if-update-available 1.7.3 (core)",
"@oclif/plugin-which 1.0.4 (core)",
"@salesforce/sfdx-diff 0.0.6",
"@salesforce/sfdx-scanner 2.12.0",
"alias 1.2.0 (core)",
"auth 1.8.1 (core)",
"config 1.3.15 (core)",
"generator 1.2.1 (core)",
"info 1.2.0 (core)",
"salesforcedx 52.0.0",
"├─ salesforce-alm 53.7.6",
"├─ data 0.4.11",
"├─ org 1.6.6",
"├─ apex 0.2.2",
"├─ custom-metadata 1.0.12",
"├─ schema 1.0.7",
"├─ templates 51.5.0",
"├─ limits 1.2.1",
"├─ @salesforce/sfdx-plugin-lwc-test 0.1.7",
"└─ user 1.3.0",
"sfdx-cli 7.136.2 (core)",
"source 1.8.9 (core)",
"telemetry 1.4.0 (core)",
"trust 1.1.0 (core)"
],
"osVersion": "Windows_NT 10.0.22000"
}
Additional information
The text was updated successfully, but these errors were encountered: