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

Memory Leak after auto update during startup #6

Open
jfastnacht opened this issue Jun 18, 2024 · 2 comments
Open

Memory Leak after auto update during startup #6

jfastnacht opened this issue Jun 18, 2024 · 2 comments

Comments

@jfastnacht
Copy link

I just started using the AstroTuxLauncher a while ago. It's running within Docker with the start command:

python3 AstroTuxLauncher.py start

I've activated auto updates:

AutoUpdateServer = true

Yesterday I've restarted the server and the launcher updated my 1.30.12.0 to 1.31.76.0. After around 2h the game became laggy and suddenly disconnected me from the server. Looking at my monitoring, I saw a linear growth in RAM usage, which dropped the moment I got disconnected:

image

The container crashed as well, so I've restarted it afterwards and first thought it was a regression within the Dedicated Server due to the new version, but what actually happened was the python process slowly increasing in RAM usage.

I rebuild my Docker image with the newest version which seems to have fixed it, just in case someone is looking for a quick fix.

So I assume that the problem started with the auto update. I still have both images, if you want to reproduce it.

@JoeJoeTV
Copy link
Owner

JoeJoeTV commented Jun 25, 2024

I will have a look at this when I have time, but the python process doesn't really have anything to do with the game itself, it just sends commands and gets responses to the dedicated server while its running. I am also slowly in the process of rewriting AstroTuxLauncher, which may fix the issue.

EDIT: The auto update also just calls a tool called depotdownloader to update the server itself. Is your temp directory a ramdisk?

@jfastnacht
Copy link
Author

Is your temp directory a ramdisk?

No and actually there's nothing special in my Containerfile and entrypoint IMHO. There's absolutely no problem up to the point, AstroTuxLauncher is working great right now. The problem only occured when it updated Astroneer on startup.

Containerfile

FROM python:3.11-slim

ARG APPHOME=/opt/astrotuxlauncher

USER root

RUN set -ex; \
    apt update; \
    apt install -y wine wine64 libwine fonts-wine git; \
    rm -rf /var/lib/apt/lists/*;

RUN set -ex; \
    git clone https://github.com/JoeJoeTV/AstroTuxLauncher ${APPHOME}

WORKDIR ${APPHOME}

RUN set -ex; \
    pip install -r requirements.txt; \
    python3 AstroTuxLauncher.py install

COPY launcher.toml launcher.toml

COPY --chmod=0755 entrypoint.sh /usr/bin/entrypoint.sh

ENTRYPOINT /usr/bin/entrypoint.sh

Entrypoint

#!/bin/bash

python3 AstroTuxLauncher.py start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants