Hello, I'm setuping growthbook as self hosted vers...
# ask-questions
m
Hello, I'm setuping growthbook as self hosted version on kubernetes. I create one deployment for ui and api with only 1 replica and an other deployment for proxy with 3 replica (for a stress test) I have few questions • api use to crash. ui app work but without api I just have "fail to fetch", here the logs
Copy code
yarn run v1.22.19
$ wsrun -p 'back-end' -p 'front-end' --no-prefix -c start
$ next start
$ node dist/server.js
ready - started server on 0.0.0.0:3000, url: <http://localhost:3000>
{"level":30,"time":1702482550777,"pid":60,"hostname":"deployment-ui-9c56d45c7-wkhl6","msg":"No config.yml file. Using MongoDB instead to store data sources, metrics, and dimensions."}
(node:60) [MONGOOSE] DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7. Use `mongoose.set('strictQuery', false);` if you want to prepare for this change. Or use `mongoose.set('strictQuery', true);` to suppress this warning.
(Use `node --trace-deprecation ...` to show where the warning was created)
{"level":30,"time":1702482551567,"pid":60,"hostname":"deployment-ui-9c56d45c7-wkhl6","msg":"Back-end is running at <http://localhost:3100> in development mode. Press CTRL-C to stop"}
{"level":30,"time":1702483922168,"pid":60,"hostname":"deployment-ui-9c56d45c7-wkhl6","msg":"Start Refreshing Results for experiment exp_8kpn21nlq3kyzxc"}
Killed
error Command failed with exit code 137.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
`yarn start` failed with exit code 137
• I saw in doc to set PROXY_HOST_PUBLIC=https://growthbook-proxy.example.com I think it's for invalid cach, if we have multi proxy clusters (1 by kub cluster) can I add multilple URL ? • in proxy log I have this : "msg":"connection polling: no connections found" what is it about ? thanks Geoffrey
r
Hi Geoffrey, if your API and Back End server on port 3100 is crashing, then the proxy definitely won't work. Please try setting things up without the proxy first, then see what's going wrong before adding in the proxy.
m
Hi @brief-honey-45610 I've tried and still the same and the ui is out
r
Hi Geoffrey, are you able to visit the ​`/healthcheck`​ endpoint at ​`http://localhost:3300/healthcheck`​ ? Change the port to the port you're using.
Make sure that all the necessary environment variables are correctly set. These include: ​`GROWTHBOOK­_API­_HOST`​, ​`SECRET­_API­_KEY`​, ​`NODE­_ENV`​, ​`CACHE­_ENGINE`​, ​`CACHE­_CONNECTION­_URL`​, ​`CACHE­_STALE­_TTL`​, ​`CACHE­_EXPIRES­_TTL`​. Double-check the values for any typos or incorrect URLs.
Ensure that the GrowthBook API host is accessible from the location where the proxy is running. If you are using a load balancer or reverse proxy for SSL termination, confirm that it is configured correctly to forward requests to the GrowthBook Proxy.
If you are using a load balancer in front of the GrowthBook Proxy, ensure that it supports HTTP/2 and streaming responses, as recommended for high-traffic production scenarios.
If you are using Redis or MongoDB as the cache engine, verify that the connection URL is correct and that the GrowthBook Proxy can connect to the cache engine. The GrowthBook server itself does not support SSL directly. If you need SSL, use a load balancer or reverse proxy to handle SSL termination.