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

Container stops working after some time #5

Open
kipusoep opened this issue May 27, 2020 · 3 comments
Open

Container stops working after some time #5

kipusoep opened this issue May 27, 2020 · 3 comments

Comments

@kipusoep
Copy link

I'm still investigating this, but the container stops working after some time: Exited (137)
The docker logs doesn't show anything special.

@kipusoep
Copy link
Author

kipusoep commented May 27, 2020

I'm guessing it's because of memory limitations. I'm running the container on a rpi 3b+ with 1GB of RAM and I read this: https://success.docker.com/article/what-causes-a-container-to-exit-with-code-137

Review the application's memory requirements and ensure that the container it's running in has sufficient memory. Conversely, set a limit on the container's memory to ensure that wherever it runs, it does not consume memory to the detriment of the node.

If the application is Java-based, you may want to review the maximum memory configuration settings.

This link also relates docker and java memory issues: https://developers.redhat.com/blog/2017/03/14/java-inside-docker/

@ronald-den-otter
Copy link
Owner

ronald-den-otter commented May 28, 2020

Hi sorry, it took some time.
I have a banana pi running at the moment with 1GB memory. Same as RPI3B+
I am using my lomem setup. And its running ok now for some time.
root@bananapi:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
71b7f6f3cf9e ronaldo1965/omada-controller:3.2.10-1-lomem "/entrypoint.sh /usr…" 10 days ago Up 10 days (healthy) omada-controller

docker stats says:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
71b7f6f3cf9e omada-controller 15.90% 333.8MiB / 512MiB 65.20% 0B / 0B 273MB / 5.36GB 0

My startup script:

version=3.2.10-1-lomem
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
docker rm omada-controller
omadadata="/opt/tplink/$version/OmadaController/data"
omadawork="/opt/tplink/$version/OmadaController/work"
omadalogs="/opt/tplink/$version/OmadaController/logs"
mkdir -p $omadadata
mkdir -p $omadawork
mkdir -p $omadalogs

docker run -d \
--name omada-controller \
--network host \
--memory 512m \
-e TZ=Europe/Amsterdam \
-e SMALL_FILES=true \
-p 8088:8088 -p 8043:8043 -p 27001:27001/udp -p 27002:27002 -p 29810:29810/udp -p 29811:29811 -p 29812:29812 -p 29813:29813 \
-v $omadadata:/opt/tplink/OmadaController/data -v $omadawork:/opt/tplink/OmadaController/work -v $omadalogs:/opt/tplink/OmadaController/logs \
ronaldo1965/omada-controller:$version

I know this is not how it is originally implemented by TP Links but it runs wel over here
But my banana pi does not do anything else.

@kipusoep
Copy link
Author

My docker stats looks good (it's better if you use formatting as code next time ;-) )

CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
7f615dc6d1bf        omada-controller    1.03%               245.7MiB / 975.6MiB   25.18%              126MB / 13.8MB      0B / 0B             114
c2443ebbf943        pihole              0.07%               27.84MiB / 975.6MiB   2.85%               76MB / 51MB         0B / 0B             21
4f13b06ec402        watchtower          0.00%               4.848MiB / 975.6MiB   0.50%               19.3kB / 0B         0B / 0B             11

It's running 46 hours now, but as you see it's not the only container I'm running.
Let me just monitor it for a few days to see what happens, I also added the restart=unless-stopped instruction.

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