hangry-river-horse icon indicating copy to clipboard operation
hangry-river-horse copied to clipboard

Log file taking up tons of disk space in production

Open randomPoison opened this issue 6 years ago • 0 comments

I'm noticing the instance keeps dying in production because the log file eats up all disk space, and then the application starts sending 500 errors when it can't do logging anymore. There are a couple of things that can be addressed here:

  • The application probably shouldn't stop responding (or send 500 responses) if logging fails. This is something that would have to be addressed in Rocket, though. See SergioBenitez/Rocket#21 for the Rocket issue that relates to this.
  • We should introduce some kind of rolling log system that appends to the end of the log and removes old logs to prevent them from wasting disk space. There is a Linux utility logrotate that provides exactly this functionality. We should incorporate it into the startup script.

randomPoison avatar May 15 '18 18:05 randomPoison