withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.06k stars 61 forks source link

Massive Log File (daemon.log) #1666

Closed dombarnes closed 1 year ago

dombarnes commented 2 years ago

Sanity checks

Issue Details

Description:

I was looking into a recent loss of disc space and in doing so found that inside ~/.fig/log/ was a file daemon.log which had grown to 14GB in size since March 2022. I tail'd the file and found it full of entries like this over and over every few ticks:

2022-08-05T14:53:34.689294Z ERROR fig_cli::daemon: 536: Error while connecting to websocket: refresh token expired
2022-08-05T14:53:34.690484Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-05T14:53:34.693750Z  WARN aws_smithy_client::builder: 245: Retries require a `sleep_impl`, but none was passed into the builder. No retries will occur with the current configuration. If this was intentional, you can suppress this message with `Client::set_sleep_impl(None). Otherwise, unless you have a good reason to use the low-level service client API, consider using the `aws-config` crate to load a shared config from the environment, and construct a fluent client from that. If you need to use the low-level service client API, then pass in a sleep implementation to make timeouts and retry work.

I have since deleted the file, quit and relaunched Fig (which also required me to log in - maybe related or not). And now when tail-ing this file, I don't see these messages. It seems the issue is somewhat resolved for now. But it seemed worthy of reporting

Environment

# Fig Diagnostics
## Fig details:
  - Fig version: Version 1.0.59 (B489) [British]
  - Bundle path: /Applications/Fig.app
  - Autocomplete: true
  - Settings.json: true
  - Accessibility: true
  - Number of specs: 0
  - Symlinked dotfiles: true
  - Only insert on tab: false
  - Keybindings path:
  - Installation Script: true
  - PseudoTerminal Path: /Users/domster83/.google-cloud-sdk/bin:/Users/domster83/laptop/bin:/Users/domster83/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/domster83/.cargo/bin:/Users/domster83/.fig/bin:/Users/domster83/.local/bin:/Users/domster83/.yarn/bin:/usr/local/opt/openssl@1.1/bin:/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:/usr/local/opt/curl/bin:/usr/local/heroku/bin:/usr/local/opt/node@14/bin:/Users/domster83/.config/yarn/global/node_modules/.bin:/usr/local/lib/node_modules:/usr/local/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/domster83/.flutter/bin:/Users/domster83/.android/sdk/emulator:/Users/domster83/.android/sdk/platform-tools:/Users/domster83/.android/sdk/cmdline-tools/latest/bin:/Users/domster83/.android/sdk/cmdline-tools/tools/bin:/Users/domster83/.webos/webOS_Signage_SDK/CLI/bin:LG_WEBOS_SIGNAGE_SDK_HOME:/Users/domster83/.pub-cache/bin
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## Hardware Info:
  - Model Name: MacBook Pro
  - Model Identifier: MacBookPro15,2
  - Chip:
  - Cores: 4
  - Memory: 16 GB
## OS Info:
  - macOS 12.5.0 (21G72)
## Environment:
  - User Shell: /bin/zsh
  - Current Directory: /Users/domster83
  - CLI Installed: true
  - Executable Location: /usr/local/bin/fig
  - Current Window ID: 28262/% (com.googlecode.iterm2)
  - Active Process: zsh (7603) - /dev/ttys011
  - Terminal: iterm
  - Environment Variables:
    - TERM_SESSION_ID=w0t0p0:165D3654-CF34-4D15-A5F5-8B2AEE2BD2E1
    - PATH=/Users/domster83/.google-cloud-sdk/bin:/Users/domster83/laptop/bin:/Users/domster83/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/domster83/.cargo/bin:/Users/domster83/.fig/bin:/Users/domster83/.local/bin:/Users/domster83/.yarn/bin:/usr/local/opt/openssl@1.1/bin:/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:/usr/local/opt/curl/bin:/usr/local/heroku/bin:/usr/local/opt/node@14/bin:/Users/domster83/.config/yarn/global/node_modules/.bin:/usr/local/lib/node_modules:/usr/local/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/domster83/.flutter/bin:/Users/domster83/.android/sdk/emulator:/Users/domster83/.android/sdk/platform-tools:/Users/domster83/.android/sdk/cmdline-tools/latest/bin:/Users/domster83/.android/sdk/cmdline-tools/tools/bin:/Users/domster83/.webos/webOS_Signage_SDK/CLI/bin:LG_WEBOS_SIGNAGE_SDK_HOME:/Users/domster83/.pub-cache/bin
    - TERM=xterm
    - FIG_INTEGRATION_VERSION=8
    - FIG_TERM=1
    - FIG_TERM_VERSION=4.3.0
    - FIG_PID=7603
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: application is not present.
  - Visual Studio Code: installed!
  - Docker: true
Chizkiyahu commented 2 years ago

My file is 335MB from 2022-07-07 and is have inside full HTML pages

Click to expand! to see HTML log ``` [2m2022-08-01T21:42:13.525164Z ERROR fig_cli::daemon: 539: Error while connecting to websocket: 502
502

502 Bad Gateway

Request ID: 7341be0984e5adb5-TLV

If you are a visitor:

  • Try again later or contact the site owner.

If you are the site owner, your application was unable to serve this request. Common reasons include:

  • You recently created a service and it has not yet completed a successful deploy.
  • Your application has crashed or failed its health check.
2022-08-01T21:42:13.761267Z  INFO fig_cli::daemon::websocket: 62: Connecting to websocket 2022-08-01T21:42:13.766381Z DEBUG hyper::client::pool: 250: reuse idle connection for ("https", api.fig.io) 2022-08-01T21:42:13.766583Z DEBUG Connection{peer=Client}: h2::codec::framed_write: 232: send frame=Headers { stream_id: StreamId(9585), flags: (0x5: END_HEADERS | END_STREAM) } 2022-08-01T21:42:14.491928Z DEBUG Connection{peer=Client}: h2::codec::framed_read: 354: received frame=Headers { stream_id: StreamId(9585), flags: (0x4: END_HEADERS) } 2022-08-01T21:42:14.492052Z DEBUG Connection{peer=Client}: h2::codec::framed_read: 354: received frame=Data { stream_id: StreamId(9585) } 2022-08-01T21:42:14.492076Z DEBUG Connection{peer=Client}: h2::codec::framed_read: 354: received frame=Data { stream_id: StreamId(9585) } 2022-08-01T21:42:14.492179Z DEBUG reqwest::async_impl::client: 2017: response '502 Bad Gateway' for https://api.fig.io/authenticate/ticket 2022-08-01T21:42:14.684000Z DEBUG Connection{peer=Client}: h2::codec::framed_read: 354: received frame=Data { stream_id: StreamId(9585) } 2022-08-01T21:42:14.684042Z DEBUG Connection{peer=Client}: h2::codec::framed_read: 354: received frame=Data { stream_id: StreamId(9585), flags: (0x1: END_STREAM) } 2022-08-01T21:42:14.684277Z ERROR fig_cli::daemon: 539: Error while connecting to websocket: 502
502

502 Bad Gateway

Request ID: 7341be10c791adb5-TLV

If you are a visitor:

  • Try again later or contact the site owner.

If you are the site owner, your application was unable to serve this request. Common reasons include:

  • You recently created a service and it has not yet completed a successful deploy.
  • Your application has crashed or failed its health check.
```
Chizkiyahu commented 2 years ago

inside the log data

Screen Shot 2022-08-08 at 23 28 23
mschrage commented 2 years ago

@dombarnes we were having issues with our backend and have since switched our hosting provider.

I believe we clear logs whenever Fig is restarted. Let me know if this issue persists.

aljrico commented 2 years ago

I am seeing the exact same issue. The daemon.log file is now at 72GB. I have restarted Fig and the laptop multiple times. I am on version 1.0.60.

I only noticed because the laptop ran out of storage. I will now manually remove the daemon.log unless told otherwise

mschrage commented 2 years ago

@grant0417 anything change with our logging?

@aljrico totally fine to delete the logs.

grant0417 commented 2 years ago

Seems like this log file has been hanging around a bit too long! Will ensure it is is deleted more often to ensure this doesnt happen!

grant0417 commented 2 years ago

Also there were some issues we were having with our old server host which is what caused the file to be filled with html pages.

aljrico commented 2 years ago

For completeness, I am not logged in. Not sure if that is related with this issue

dombarnes commented 2 years ago

Given how often some developers restart their computers (monthly for some?) it may be worth doing a max size cycle or daily?

buzzcutts commented 2 years ago

same issue here- noticed process 'fig darwin universal' cranking at 25% cpu. Daemon.log grew to ~80GB quit and deleted .log

grant0417 commented 2 years ago

Is anyone able to send the last 100-1000 lines of the log files, not too sure why they are growing so quickly, the fix should be out soon however to clean them up.

Chizkiyahu commented 2 years ago
nnmrts commented 2 years ago

Is or could there be sensitive information in my log file? Ready to share mine as well, although it is almost 5GBs big...

grant0417 commented 2 years ago

Thanks @Chizkiyahu, looks like something has caused debug level logging in the log files, typically they only log INFO or higher, I believe the issues should be resolved (as i mentioned earlier) but that has been helpful!

davrax commented 2 years ago

Same issue here- I'd installed Fig (with Homebrew) 4-5 days ago, started it, but did no further setup. Observed that I was rapidly running out of storage space, and found that daemon.log has grown to 19 GB of this:

2022-08-18T17:09:56.806421Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.807037Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.808307Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.808525Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.812232Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.812539Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.813695Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.813939Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.815125Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.815292Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.816467Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.816635Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.819256Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.819440Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.820733Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.820899Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.822045Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.822171Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.826751Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
2022-08-18T17:09:56.826892Z ERROR fig_cli::daemon: 538: Error while connecting to websocket: missing field `expiration_time` at line 3 column 1
2022-08-18T17:09:56.828037Z  INFO fig_cli::daemon::websocket: 68: Connecting to websocket
grant0417 commented 2 years ago

@davrax, that is strange, can you try running fig update

sthales commented 2 years ago

Same issue here. fig update resolved.

image
parssak commented 1 year ago

this has been resolved in newer versions of Fig, if you experience this, make sure to update to the latest version

maddler commented 7 months ago

This is still happening in latest version

❯ fig version fig_cli 2.15.0

On top of that, after running 'fig uninstall' the 'fig daemon' would be left running and once killed will, in turn cause logs to be flooed with

Jan 23 22:30:02 dracula systemd[349]: fig-daemon.service: Service RestartSec=5s expired, scheduling restart.
Jan 23 22:30:02 dracula systemd[349]: fig-daemon.service: Scheduled restart job, restart counter is at 1.
Jan 23 22:30:02 dracula systemd[13131]: fig-daemon.service: Failed to execute command: No such file or directory
Jan 23 22:30:02 dracula systemd[13131]: fig-daemon.service: Failed at step EXEC spawning /usr/bin/fig: No such file or directory
Jan 23 22:30:02 dracula systemd[349]: fig-daemon.service: Main process exited, code=exited, status=203/EXEC
Jan 23 22:30:02 dracula systemd[349]: fig-daemon.service: Failed with result 'exit-code'.

Of course the service files would've been deleted during the uninstall. Pretty messy and upsetting to be honest.

Amine27 commented 6 months ago

@maddler Did you managed to fix this problem? I am having the same logs. Thank you.

maddler commented 6 months ago

I had to re-install, fully disable the service and the uninstall the app itself. But after the lack of support I fully removed the app from all my servers and computers. Can't risk having a disk filled by that.

boxed commented 4 months ago

I tried out fig for a very short time. Got a 40gig log file.

adhamsalama commented 3 months ago

@maddler They don't allow installing Fig on Linux anymore, so I can't even try your solution. :/