How to limit the debug.log file while running bitcoind? The debug.log file is getting pretty big on bitcoind. How do you limit the size of the file? I'm on Ubuntu 12.
You can use logrotate.
Create a file named bitcoin-debug in /etc/logrotate.d.  

This is the contents:


/home/bitcoin/.bitcoin/debug.log
{
        rotate 36
        monthly
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
                kill -HUP `cat /home/bitcoin/.bitcoin/bitcoind.pid`
        endscript
}


Replace /home/bitcoin/.bitcoin with the actual path to your bitcoin directory.

The full logrotate manpage is here: http://manpages.ubuntu.com/manpages/jaunty/man8/logrotate.8.html

In ubuntu the logrotate daemon manages many different log files.  In the /etc/logrotate.d folder, each file contains instructions for the logrotate deamon.  Adding this file tells logrotate that you want to start a new log file once a month. The other options tell it to compress the old logs after a day and to keep only 36 months worth (3 years) of logs. 

I originally found out about logrotate from this thread: https://bitcointalk.org/index.php?topic=130533.0

Another thing to bear in mind is that given this sends the SIGHUP signal to the bitcoin server, if you happen to be running bitcoin within gdb, it becomes necessary to tell gdb to ignore the SIGHUP signal, so far example, bitcoind can be run using: gdb $HOME/.bitcoin/bitcoin-qt -ex 'handle SIGHUP nostop' -ex run