flightstats / hub

fault tolerant, highly available service for data storage and distribution
http://www.flightstats.com
MIT License
103 stars 35 forks source link

HUB-908: Add gc log rotation #1256

Closed lkemmerer closed 3 years ago

lkemmerer commented 3 years ago

This should give us a max of 10 100MB files of gc logs. It looks like iad.prod goes through about 1.5GB of gc logs in a week, so this keeps 'em around for a very little while, but maybe not long enough? I deployed this to iad.dev, where it takes about a week to get 150-200MB of logs, so I should be able to confirm the settings work as expected on Monday.

Naming pattern will be gc.log.0, gc.log.1.current, gc.log.2, etc, (possibly with a non-current gc.log.1?) where it'll just kinda round-robin and overwrite old data, as far as I can tell.

I'm not a java 8/JVM expert, so maybe there's a better way to go.