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

**URL:** <https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683>\
**Category:** Developer Discussions\
**Created:** [September 13, 2019, 11:53pm UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683 "2019-09-13T23:53:57Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sasha/32/69_2.png) [@Sasha](https://forum.storj.io/u/Sasha)\
**Post date:** [September 13, 2019, 11:53pm UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/1 "2019-09-13T23:53:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [September 14, 2019, 2:43am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/2 "2019-09-14T02:43:03Z")

</div>

> [@Sasha](#):
>
> 22,167,248 bytes

Which operating system are you using ?

---

<div class="post-metadata">

**Author:** ![Sasha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sasha/32/69_2.png) [@Sasha](https://forum.storj.io/u/Sasha)\
**Post date:** [September 15, 2019, 5:16am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/3 "2019-09-15T05:16:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 15, 2019, 4:21pm UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/4 "2019-09-15T16:21:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sasha](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sasha/32/69_2.png) [@Sasha](https://forum.storj.io/u/Sasha)\
**Post date:** [September 16, 2019, 4:20am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/5 "2019-09-16T04:20:30Z")

</div>

How to split logs

> [@Docker post installation configuration](https://forum.storj.io/t/docker-post-installation-configuration/850):
>
> I would like suggest add to the [documentation](https://documentation.storj.io/setup/storage-node#running-the-storage-node) docker post installation steps: limit docker log files and add retention: "log-driver": "json-file", "log-opts": { "max-size": "100m", "max-file": "3" } and change default [shutdown timeout parameter](https://docs.docker.com/engine/reference/commandline/dockerd/): "shutdown-timeout": 300 I tested both parameters on my node, and evrything is working fine. If you will reboot host machine, no need to stop container before with docker stop storagenode -t 300 command, now daemon will handle it easy…

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 16, 2019, 9:30pm UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/6 "2019-09-16T21:30:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zeroheat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/zeroheat/32/1134_2.png) [@zeroheat](https://forum.storj.io/u/zeroheat)\
**Post date:** [August 24, 2021, 5:53am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/7 "2021-08-24T05:53:36Z")

</div>

> [@Alexey](#):
>
> Only the standard logrotate.

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!

🙂

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 24, 2021, 6:08am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/8 "2021-08-24T06:08:14Z")

</div>

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

```auto
/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

> [@How to create daily storagenode logs](https://forum.storj.io/t/how-to-create-daily-storagenode-logs/6199/5):
>
> are you running in a NAS or Windows or Linux? In Ubuntu I use the “logrotate” command in a cron job to create/compress log files. First you have to make sure you have added in the “Log Location” and “Log level” fields in the “config.yaml” Then look in the “/etc/logrotate.d/” folder, you’ll see a list of files, those are the configs used to rotate logfiles ( usually found in “/var/log/”). I just put a “storj” config file in the logrotate.d/ and it’s done automatically To rotate my logs i use …

---

<div class="post-metadata">

**Author:** ![zeroheat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/zeroheat/32/1134_2.png) [@zeroheat](https://forum.storj.io/u/zeroheat)\
**Post date:** [August 24, 2021, 6:18am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/9 "2021-08-24T06:18:19Z")

</div>

> [@Alexey](#):
>
> I uses such options in `/etc/logrotate.d/storagenodes` :
> 
> ```auto
> 
> ```

what about for Windows? The GUI istallation version?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 24, 2021, 6:29am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/10 "2021-08-24T06:29:52Z")

</div>

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&](https://github.com/AlexeyALeonov/storagenode_win_log_rotate) (beware - it’s not compatible with logrotate), use some GUI programs (I’m sure it should exist [logrotate windows - Google Search](https://www.google.com/search?q=logrotate+windows)).

---

<div class="post-metadata">

**Author:** ![zeroheat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/zeroheat/32/1134_2.png) [@zeroheat](https://forum.storj.io/u/zeroheat)\
**Post date:** [August 24, 2021, 6:39am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/11 "2021-08-24T06:39:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 24, 2021, 6:55am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/12 "2021-08-24T06:55:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zeroheat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/zeroheat/32/1134_2.png) [@zeroheat](https://forum.storj.io/u/zeroheat)\
**Post date:** [August 24, 2021, 7:08am UTC](https://forum.storj.io/t/node-log-to-file-stopped-updating-after-hitting-a-particular-size-limit/1683/13 "2021-08-24T07:08:57Z")

</div>

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