Islandora-Collaboration-Group / ISLE

Islandora Enterprise (ISLE) is a community project that addresses two of the most significant pain-points in Islandora: installation and maintenance.
https://Islandora-Collaboration-Group.github.io/ISLE/
GNU General Public License v3.0
32 stars 34 forks source link

MySQL image - Logs are not being logrotated properly and growing to abnormal sizes #193

Closed g7morris closed 5 years ago

g7morris commented 5 years ago

Issue description

The mysql.log is growing to large sizes ranging from 13 to 46 GB if left unchecked.

Questions / Pseudo-code solutions

Q1: I guess the broader question is, does this behavior impact all logs per se?

Q2: Is logrotate a thing on Docker?

Q3: @br2490 @shauntru Do we want to consider this below as a solution or the ones in the next section below?

Additional resources / ideas

Please note: I didn't find that it was a challenge until several types of conditions occurred all at once, e.g. several large scale ingests with enough time passing on several different systems, so this would have only been caught in testing if we had large scale data sets and more time.

Steps to reproduce the issue

  1. Use a running ISLE v1 or v2 system for 1-2 weeks
  2. Ingest beyond 10 GB
  3. Check log size

What's the expected result?

What's the actual result?

DiegoPino commented 5 years ago

Hi, my 2 cents IMHO rotating logs (or even keeping them) via Docker container specifics feels like a bad ideal I would say the better behavior of exposing them directly as > /dev output of the container (so you can see them using docker logs -tail etc ) seems the better approach and in that case managing/cleaning them becomes a host level task (can be crond-ed) which can be automatized to clean/remove or archive them. Since we all agree on data separation when planning Docker containers, maybe there are other better ideas on how to deal with them? Issue we had is that once you expose those internal container logs to the outside via > /dev/bla, the actual storage (by default) starts happening in the docker-machine, at least in Mac (OSX). And then you have to extract the location via a docker info, then log into the docker machine! (first time i had to do it in my life) and then remove them from there. Annoying!

Also, finally, should we have different log setups (using ENV) that switch based on production / dev environment (with production outputting only ERRORS?)

Diego Pino Navarro Metropolitan New York Library Council 599 11th Av. New York, NY 10036

g7morris commented 5 years ago

Rotating logs is no longer handled in ISLE since release version 1.2.0. Closing ticket.