[GH-ISSUE #375] Limit container log file size; currently unlimited #254

Closed
opened 2026-10-15 12:58:51 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @soxhi8 on GitHub (Mar 28, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/375

Please consider adding a size limitation to sub-containers. A sub-container created a 2.70 TB log file on my system within a week of being unattended:
Image
Containing this line over and over:

{"log":"334:42:14.294140843 \u001b[32m    1\u001b[00m 0x7f460001e950 \u001b[33;01mWARN   \u001b[00m \u001b[00m            audiosrc gstaudiosrc.c:227:audioringbuffer_thread_func:\u003cpulsesrc17\u003e\u001b[00m error reading data -1 (reason: Success), skipping segment\n","stream":"stderr","time":"2026-03-28T21:39:10.239044836Z"}
Originally created by @soxhi8 on GitHub (Mar 28, 2026). Original GitHub issue: https://github.com/games-on-whales/wolf/issues/375 Please consider adding a size limitation to sub-containers. A sub-container created a 2.70 TB log file on my system within a week of being unattended: <img width="1465" height="305" alt="Image" src="https://github.com/user-attachments/assets/ca5b6846-78a2-46a1-af25-263a57a877cc" /> Containing this line over and over: ``` {"log":"334:42:14.294140843 \u001b[32m 1\u001b[00m 0x7f460001e950 \u001b[33;01mWARN \u001b[00m \u001b[00m audiosrc gstaudiosrc.c:227:audioringbuffer_thread_func:\u003cpulsesrc17\u003e\u001b[00m error reading data -1 (reason: Success), skipping segment\n","stream":"stderr","time":"2026-03-28T21:39:10.239044836Z"} ```
Author
Owner

@ABeltramo commented on GitHub (Mar 29, 2026):

You should configure Docker/your system logs correctly. This is outside the scope of Wolf https://docs.docker.com/engine/logging/configure/

<!-- gh-comment-id:4149183929 --> @ABeltramo commented on GitHub (Mar 29, 2026): You should configure Docker/your system logs correctly. This is outside the scope of Wolf https://docs.docker.com/engine/logging/configure/
Author
Owner

@soxhi8 commented on GitHub (Mar 29, 2026):

You should configure Docker/your system logs correctly. This is outside the scope of Wolf https://docs.docker.com/engine/logging/configure/

As this log file was spawned by a sub-container of wolf, I would strongly advocate for safe defaults instead. System level log file limits are not available on every system. TrueNAS does not give users the option to limit them system-wide.
This could be added to https://github.com/games-on-whales/wolf/blob/stable/src/moonlight-server/runners/docker.cpp if I interpret the role of the runner correctly.

<!-- gh-comment-id:4149817919 --> @soxhi8 commented on GitHub (Mar 29, 2026): > You should configure Docker/your system logs correctly. This is outside the scope of Wolf https://docs.docker.com/engine/logging/configure/ As this log file was spawned by a sub-container of wolf, I would strongly advocate for safe defaults instead. System level log file limits are not available on every system. TrueNAS does not give users the option to limit them system-wide. This could be added to https://github.com/games-on-whales/wolf/blob/stable/src/moonlight-server/runners/docker.cpp if I interpret the role of the runner correctly.
Author
Owner

@ABeltramo commented on GitHub (Mar 29, 2026):

There's no option in the Docker APIs that just say limit the logs to X, what you can do is to set your Docker installation properly following the official documentation.
You can also set the LogConfig for a container which, depending on which options you choose, it might allow to limit the log size (not all options do AFAIK). You can add that option and set it to your liking in Wolf config.toml under the base_create_json for an app.

Providing a "default" would mean:

  • forcing a selection in the log provider (ex: journald, syslog, local...) that would effectively override what users might want
  • picking a random value for limiting the log size: 10MB, 100MB, 1GB?

All this stuff depends on your system, how it's configured, the HW involved.. Not something that we should force on users IMHO.

<!-- gh-comment-id:4149901502 --> @ABeltramo commented on GitHub (Mar 29, 2026): There's no option in the Docker APIs that just say limit the logs to X, what you can do is to set your Docker installation properly following the official documentation. You can also set the `LogConfig` for a container which, depending on which options you choose, it might allow to limit the log size (not all options do AFAIK). You can add that option and set it to your liking in Wolf `config.toml` under the `base_create_json` for an app. Providing a "default" would mean: - forcing a selection in the log provider (ex: `journald`, `syslog`, `local`...) that would effectively override what users might want - picking a random value for limiting the log size: 10MB, 100MB, 1GB? All this stuff depends on your system, how it's configured, the HW involved.. Not something that we should force on users IMHO.
Author
Owner

@soxhi8 commented on GitHub (Mar 29, 2026):

I see your point. It would have to fit into the whole Wolf-setup of "magically" figuring it out; what log-type the system uses and adapting to it. Setting p.e. a limit of 1GB would safeguard against runaway scenarios, like the one that I encountered. 1GB would even exceed the usefulness limit for regular gaming deployments, that are not trying to debug something very specific. Even then, this would be something the user should be able to configure, if need be.

I will see if what I propose can be adapted into Wolf and provide a working example, instead of trying to convince you on a theoretical feature. Talk to you then.

<!-- gh-comment-id:4150157424 --> @soxhi8 commented on GitHub (Mar 29, 2026): I see your point. It would have to fit into the whole Wolf-setup of "magically" figuring it out; what log-type the system uses and adapting to it. Setting p.e. a limit of 1GB would safeguard against runaway scenarios, like the one that I encountered. 1GB would even exceed the usefulness limit for regular gaming deployments, that are not trying to debug something very specific. Even then, this would be something the user should be able to configure, if need be. I will see if what I propose can be adapted into Wolf and provide a working example, instead of trying to convince you on a theoretical feature. Talk to you then.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#254
No description provided.