<p>I've just noticed from a very nasty gcp bill that cockroachDB has logged 1.5tb of errors on stackdriver, costing me several hundred dollars in just a few days. Sadly I had left it on 100% logging. The errors look like this and are piling up multiple times per second.</p>

<pre><code>E  I180712 11:18:41.963205 106 server/status/runtime.go:223  [n2]
runtime stats: 1.5 GiB RSS, 283 goroutines, 254 MiB/54 MiB/441 MiB GO alloc/idle/total, 
918 MiB/1.1 GiB CGO alloc/total, 
2175.51cgo/sec, 
0.16/0.02 %(u/s)time, 0.00 %gc (1x)
</code></pre>

<p>Does anybody know what they mean, and how to stop them? </p>

bruce
<p>These are all CockroachDB logs, not just errors. This is indicated by the <code>I</code> prefix (meaning <code>Info</code>) in the CockroachDB log line. The listed log lines show basic memory information for the <code>cockroach</code> process. This is logged every 10 seconds.</p>

<p>If you wish to persist logs I would recommend filtering by severity.</p>

<p>This can be done by CockroachDB itself when redirecting logs to stderr by using: <code>--logtostderr=Level</code> where <code>Level</code> is one of <code>Info</code>, <code>Warning</code>, <code>Error</code>, or <code>Fatal</code>.</p>

<p>If you are saving the raw logs, you could do a quick pass to discard anything not starting with a desired prefix. This will however not be as accurate as the <code>--logtostderr</code> method as you would need to handle multi-line log entries.</p>
