Issue running standard Docker Compose instance of bbapps in CLUSTER_MODE #11814
Replies: 4 comments 7 replies
-
So I did some digging and it appears in startup.ts, it resets the PORT environment variable to whatever http server is producting:
I think in the past version, it started listener and waited until complete before it got here. I'm guessing because of pm2 spinning up new processes. However, the new version doesn't seem to wait. Interesting still, if I just comment out the setting of the PORT, it appears to work fine. I notice multiple processes starting and can see them randomly being hit when hitting the server. Is this something they can do without; if not for the single node instance, at least for the pm2-initiated version? If it will work for the latter, could a if statement be added to ignore if "CLUSTER_MODE" is true? |
Beta Was this translation helpful? Give feedback.
-
Any word on this? |
Beta Was this translation helpful? Give feedback.
-
I deploy budibase in my k8s environment. And the app-service pod is failing because of this. Any update on this? does anyone has any work around? |
Beta Was this translation helpful? Give feedback.
-
This is true. You would want to set you vcpu limits on your budibase containers to 1 and just spin up more containers... if I'm correct. However, for anyone running a straight docker container on a multi core processor, this is going to cause problems. |
Beta Was this translation helpful? Give feedback.
-
Checklist
Hosting
Describe the bug
If I do a standard install of Budibase through the docker-compose method and enable clustering with CLUSTER_MODE=1 and the pm2 file, the bbworker container starts up in cluster mode with no issue. However, bbapps fails to start with an error.
To Reproduce
I have installed Docker and Docker composed as described here: https://github.com/Budibase/budibase/tree/master/hosting/scripts/linux
I have copied the docker-compose.yaml from here: https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml
I have copied the .env files from here: https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env
From here, you can see that all I did was a "pull" and "up -d" and it works as expected.
I then do a docker compose "down", edit my compose yaml to include CLUSTER_MODE. In addition, I add a pm2 file.
My pm2 file looks like this:
DOCKER-COMPOSE UP AGAIN - Look at the logs and you see for the bbapps container, it's starting on "null" and has an error. bbworker starts as expected.
Expected behavior
Expect bbapps to start similar to bbworker
Screenshots
Log have been included in my "Reproduce" above.
App Export
No apps installed
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions