Pangolin compose doesn't start in working condition on weak machine - fix with delayed start #3136
Replies: 1 comment
|
This log appears relevant to the problem: gerbil | 03:00:02 Stopping SNI Proxy...
gerbil | ERROR: 03:00:58 Failed to load configuration: Post "http://pangolin:3001/api/v1/gerbil/get-config": dial tcp 172.18.0.4:3001: connect: connection refused == pangolin | [Error: Failed to find Server Action "95a72bb7". This request might be from an older or newer deployment. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have unattended udates, which frequently require system restart. Over several months, I observed that all my Pangolin instances (running on 1c/1G RAM VPS) became after each reboot non-functional. No resource nor the dashboard working.
Can't connect at all:
The stack remaining running, can SSH in, restarting the Pagolin containers one by one doesn't help.
Only entire stack down & up again restores functionality.
Figured out it is possibly because the stack is heavy for weak machine and somehow it mangled itself if systemd initializes compose immediately after machine boot.
(Have it with CrowdSec and there is the ufw-docker - but it is of no difference if ufw-docker not used.)
Didn't add this as Issue as it's solved by config for OS rather to changing anything with Pangolin.
The root cause is unknown to me.
Solution for me is to delay start of the compose by some time and let the OS handle what is necessary; start the compose later.
How:
Change in
docker composethe unless-stopped to > nocreate file:
sudo vim /etc/systemd/system/docker-pangolin-delay.serviceadd in:
sudo systemctl daemon-reloadsudo systemctl enable my-stack.servicerebootdocker ps- only non-delayed will be started already (if anything is beside the Pangolin), Pangolin containers show itself after the delay timeCan watch the spike in CPU/RAM usage with htop when the start hit.
Hope it helps.
All reactions