Log file getting 2GB size increase in just under an hour

Hi! I have a problem with my node. The node is generating an absurd amount of logs. Node started to crash every few hours and the log file size when the crash happens is about 20-30GB. I cannot open logs since the file is just to big. How to know what is happening?

Operating system: Windows
Node version 1.109.2

Wow! What is the log level on your config.yaml file?

Info is the level of log.

What’s the content of the last lines of the log?

How did you install it on Windows, is it running in WSL or docker by any chance?

cannot open the file since its to big when it crashes, I installed it with Windows GUI.

In Powershell:

Get-Content ./log.log -Tail 10

thanks will use it when it crashes

Use it now. If the log is groing so quickly it may be throwing a ton of error messages already and it might be useful to know what those are…

Just in case you need more log level, there are also the following levels available:

  • warn
  • error
  • fatal

But you should check the cause of you node like @JWvdV descibed.

2 Likes

I noticed large log files in Windows as well, although it doesn’t have to signal an issue. It might, but a large file can be normal. With log-level info (default) every upload and download gets logged. Especially with the test-data lately, log files can grow rapidly. In my experience by 2GB+ per day, simply due to the traffic.

Not ideal, but simply stopping the storagenode-service (through the Services-app in Windows), deleting the log file and restarting the service would keep it clean…-ish. I don’t recommend it, as every restart would signal a filewalker with added I/O.

1 Like

You may also change the log level on the fly without restart, using the debug port:

You may configure a logrotate for Windows, the config file for logrotate can be like this:

or you may use a custom script like this: