Node log to file stopped updating after hitting a particular size limit

log.output: “/app/config/node.log”

I’ve noticed my node.log stopped updating after it hit a size of (22,167,248 bytes).

  • Has anyone else noticed this?
  • Is there a possible issue in how the node operates if the node.log reaches a certain size?
  • Is there an additional command that can be used to split and create a new node.log file, which would create incremental node.log files as an archive?

I had to rename the log and restart the node to resume back to normal operation with a new empty node.log file

Which operating system are you using ?

This might have been an anomaly as I could re-create it, however I would still like to know:

  • Is there an additional command that can be used to split and create a new node.log file, which would create incremental node.log files as an archive?

Only the standard logrotate.
The storagenode doesn’t have any such functions as far as I know.

How to split logs

This works only if you didn’t redirect the log.

1 Like

Hi Alexey,

Can you share those options? I am looking for something to limit the log file size. For example, 100 or 300 MB and after that to start over again. Because currently it is over 1GB and it is useless for me. I don’t need such big history of event so way back.

Thank you in advance!

:slight_smile:

I uses such options in /etc/logrotate.d/storagenodes:

/mnt/w/storagenode5/storagenode.log {
    rotate 14
    monthly
    maxsize 1G
    copytruncate
    compress
    missingok
    notifempty
}
/mnt/w/storagenode5/storagenode-updater.log {
    rotate 14
    monthly
    maxsize 1G
    copytruncate
    compress
    missingok
    notifempty
}

based on

what about for Windows? The GUI istallation version?

Many options, you can use the logrotate for Windows, write own script like this one: GitHub - AlexeyALeonov/storagenode_win_log_rotate: Windows GUI storagenode log rotation script (doesn& (beware - it’s not compatible with logrotate), use some GUI programs (I’m sure it should exist logrotate windows - Google Search).

Doesn’t StorJ support its own option in the config file to limit the size of the logs?

No. It’s also does not include any other system tools like RAID, mailserver, S.M.A.R.T. checker, etc.
It’s a typical POSIX service - it can do only one job (provide storage and bandwidth to the customers) and do it well.
As you know, the updater is a separate service too.

OK
I will do that manually
Maybe once or twice per month. It’s not time consuming.