coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
28.55k stars 1.48k forks source link

[Bug]: Network issues after Hetzner VPS rescale #2775

Open Achder opened 1 month ago

Achder commented 1 month ago

Description

I have a strange issue:

Without real code changes my backend deployment now fails because it can't acquire a connection to my database. I can connect from my local machine and directly from the target server. The issue seems to only appear in the coolify network. I have tried to switch from nixpacks to docker compose but the issue is the same.

I tried a ton of configurations for knex but the issue persists. I also don't think the configuration is the culprit because I can deploy the app fine if I do it manually.

After some more research I found this post in the discord: https://discord.com/channels/459365938081431553/1121768420883562526/threads/1260003927743533056

I have also rescaled the servers that host my database and my backend. So maybe that's a clue. I'm using the self-hosted version of Coolify. I understand that your prio is at paying customers and I love the project. But maybe we can figure this out together.

Minimal Reproduction (if possible, example repository)

I'm really sorry but I can't provide a reproduction. The issue is quite illusive to me.

Exception or Error

backend:start: > strapi start backend:start: backend:start: [2024-07-09 13:59:40.195] debug: ⛔️ Server wasn't able to start properly. backend:start: [2024-07-09 13:59:40.199] error: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call? backend:start: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call? backend:start: at Client_PG.acquireConnection (/app/node_modules/knex/lib/client.js:332:26) backend:start: at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:305:28) backend:start: at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19) backend:start: at async Strapi.bootstrap (/app/node_modules/@strapi/strapi/dist/Strapi.js:391:9) backend:start: at async Strapi.load (/app/node_modules/@strapi/strapi/dist/Strapi.js:426:5) backend:start: at async Strapi.start (/app/node_modules/@strapi/strapi/dist/Strapi.js:216:9) backend:start: npm ERR! Lifecycle script start failed with error: backend:start: npm ERR! Error: command failed backend:start: npm ERR! in workspace: backend@0.1.0 backend:start: npm ERR! at location: /app/apps/backend

Version

v4.0.0-beta.306

Achder commented 1 month ago

It also seems as though the coolify network is really slow now. My npm installs take 10-15 minutes. Installs on the server itself are way faster. Is it possible to somehow reset the coolify docker network? I have no clue about how docker networks work.