Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Limit docker container log size #208

Closed
1 task done
douginoz opened this issue Aug 1, 2023 · 2 comments
Closed
1 task done

[FEAT] Limit docker container log size #208

douginoz opened this issue Aug 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@douginoz
Copy link

douginoz commented Aug 1, 2023

Is this a new feature request?

  • I have searched the existing issues

Wanted change

Specify limits to the size of jellyfin docker container log files to prevent huge log files consuming disk space.

Reason for change

My jellyfin docker log file (-json.log) was 50GB for whatever reason, so I ran out of disc space. By default there's no limit or log rotation happening with the console logs of docker containers, but this can be changed globally, ie. /etc/docker/daemon.json, or on a container basis. Useful info on this here.
The simplest approach is to include limits in the docker run command or the docker compose file. This feature request is to have this reviewed and ideally included in any official jellyfin docker documentation.

While it's always important to understand why a docker container log file grows so large, that's a separate exercise. This feature request is to ensure there is good logging practices configured when using jellyfin in docker.

Proposed code change

Suggest documentation include parameters in docker run commands or docker compose files:

Example docker compose:

moa@sophie:~/docker_configs$ cat jellyfin.yml 
version: "3.7"

services:
  jellyfin:
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
    container_name: jellyfin
    image: cr.hotio.dev/hotio/jellyfin
    restart: unless-stopped
    ports:
      - "8096:8096"
   etc.
docker run command:
 docker run \
      --log-driver json-file --log-opt max-size=10m \
      etc.
@douginoz douginoz added the enhancement New feature or request label Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Aug 1, 2023

Log size limiting is beyond the scope of our sample docker run and compose yamls

If the container log got that big, either there's something wrong with the app (repeated error logging) and/or you didn't update the container in a long time.

@aptalca aptalca closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants