bitcoind debug log file is growing without limit #31795

issue embetrix openend this issue on February 4, 2025
  1. embetrix commented at 5:20 pm on February 4, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    when setting bitcoind log file in bitcoin.conf:

    debuglogfile=/var/run/bitcoin/bitcoind.log

    the file is just growing without a limit

    Workaround:

    debuglogfile=/dev/null

    Expected behaviour

    the file should rollback to 0 if a specified limit or predefined limit size is reached i.e :

    debuglogfile_size=16 (in MB)

    Steps to reproduce

    NA

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    all

    Operating system and version

    Linux

    Machine specifications

    No response

  2. pinheadmz commented at 6:01 pm on February 4, 2025: member

    The log file gets truncated when you restart bitcoind. There have been proposals for pruning the log but I think the recommendation is just to use a manager on your own system:

    #24950 (comment)

    #22350 (comment)

  3. embetrix commented at 6:10 pm on February 4, 2025: none

    I’m using a raspberrypi with sdcard (1TB), I want to let my full node running and do not plan to restart my bitcoind everyday, this is unnecessary to use humongous amout of RAM or SDCard for the logs.

    I disabled now the debug by setting

    nodebuglogfile=1

    But I think that log rotation make sense.

  4. pinheadmz commented at 6:12 pm on February 4, 2025: member
    Please see the linked comments above. I think your issue is a duplicate and has been addressed many times already
  5. embetrix commented at 6:15 pm on February 4, 2025: none
    I saw the MRs but they were not merged
  6. pinheadmz commented at 6:18 pm on February 4, 2025: member
    but did you read the comments – the reason bitcoin core doesn’t manage its logs how you want
  7. embetrix commented at 6:21 pm on February 4, 2025: none
    it’s not how I want, it just make a sens to implement that if using a system with restricted ressources and have in mind that not all bitcoin nodes are powerful PCs.
  8. maflcko commented at 11:34 pm on February 4, 2025: member

    https://bitcoin.stackexchange.com/questions/18857/how-to-limit-the-debug-log-file-while-running-bitcoind

    Usually the issue tracker is used to track technical issues related to the Bitcoin Core code base.

    General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange or the #bitcoin IRC channel on Libera Chat, or one of the Bitcoin subreddits, or any other place that you feel is well suited.

  9. pinheadmz closed this on Feb 5, 2025

  10. maflcko added the label Questions and Help on Feb 5, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-02-22 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me