-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: DB connection issue on Kubernetes #6748
Comments
I was eventually able to get rid of this error by allocating more resources to the instance and trying to shorten the service path from |
I still encountered the problem by using a shorter service name: postgres and not limiting resource usage. this is my docker-compose.yml:
|
In my case, it's more about interacting with the database via Kubernetes, as it doesn't come with the underlying container, in which case there are almost always deployment issues. I tried running your docker-compose and I got the error too, have you tried using the default docker-compose? I don't have any problems with it, maybe it's because of the parameters you added to your version.
|
I tried the default |
It feels like a machine resource issue; the CPU usage spikes to 131% at the instant
same #6652 |
The same error, but I am using
I know that it may not be possible to use the shell interaction function in CI mode, but I don't know what version number to use as a parameter; |
My problem has been solved; I hope this helps everyone! logto:
image: svhd/logto:latest
container_name: lobe-logto
ports:
- '3001:3001'
- '3002:3002'
depends_on:
postgresql:
condition: service_healthy
environment:
- 'TRUST_PROXY_HEADER=1'
- 'DB_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/logto'
- 'ENDPOINT=https://lobe-auth-api.example.com'
- 'ADMIN_ENDPOINT=https://lobe-auth-ui.example.com'
- entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
+ entrypoint: ['sh', '-c', 'npm run cli db alteration deploy 1.22.0 && npm run cli db seed -- --swe && npm start'] |
Describe the bug
When deploying Logto using the provided Kubernetes deployment YAML, the application consistently crashes with a timeout error when attempting to connect to the PostgreSQL database. However, manual connections to both the main database and the Logto database work fine without any issues.
Expected behavior
Logto should start successfully and connect to the PostgreSQL database without timing out when deployed using the provided Kubernetes deployment configuration.
How to reproduce?
Set up PostgreSQL:
logto
namespace.logto
is created and accessible.logto-postgresql.logto.svc.cluster.local
on port5432
.Apply the following Kubernetes deployment YAML for Logto:
And also deploy from the docker-compose example ultimately causes the same error
The following error message appears:
Context
Self-hosted, Logto version: Latest (as of the date of this report) Deployment method: Container (Docker image)
The text was updated successfully, but these errors were encountered: