Closed pirog closed 2 years ago
Hard to be sure but waiting for the socket to be ready first definitely seems to improve things significantly. Have not yet had a failure.
@pirog if you push it up with a branch, I'll run/test it.
@mikemilano sounds good.
This problem is described a bit here: https://docs.lando.dev/config/platformsh.html#platformsh-agent-errors and it is currently the biggest blocker for getting to alpha.
Replicating it is a bit tricky because im guessing this is a race condition on some level. However if you
lando destroy && lando start
,lando rebuild
orlando restart
enough times you'll eventually notice one of your services (usually the application container) fails. Thedocker logs
on that service usually contains something likeor
My suspicion here is that there is a race between the agent being ready to receive connections and the
/etc/platform/boot|start
running.The best/most consistent evidence i have of this is
lando init
thelando-d8
project from platform. orlando destroy
it if you already have it pulled downlando start
everything uplando restart
-> you should notice the cache/app services fail with errors like above, and this seems to be pretty consistent regardless of the amount of times youlando restart
sleep 5
to the bottomlando restart
-> seems to work as expectedIf we feel like this is the actual problem then we should add some more sophisticated logic to
psh-boot.sh
so that it waits until the socket is ready. Eg something like