DB content deleted after some time of DB connection being idle
Hello,
I'm ussing ferretdb with Neon on the free plan.
It works, I can insert data, all is operational. However, my application is not always inserting/querying data.
After some time I see the connection idle. And then, my tables, and all the data is deleted.
Can you please tell me if this is expected in the free plan?
4 Replies
generous-apricot•12mo ago
@Rita
Can you share a minimal reproducible? An example code would be helpful to help you debug this better.
sensitive-blueOP•12mo ago
I'm using ferretdb on a container as part of a Komodo test environment (https://github.com/mbecker20/komodo):
services:
ferretdb:
image: ghcr.io/ferretdb/ferretdb:latest
container_name: ferret-neon
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local}
networks:
- default
ports:
- 27017:27017
- 8088:8088
environment:
- FERRETDB_POSTGRESQL_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}?sslmode=require
- FERRETDB_SETUP_TIMEOUT=30s
core:
image: ghcr.io/mbecker20/komodo:latest-aarch64
container_name: komodo-core-neon
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local}
networks:
- default
ports:
- 9120:9120
env_file: ./compose.env
environment:
KOMODO_DATABASE_URI: mongodb://${DB_USERNAME}:${DB_PASSWORD}@ferret-neon:27017/${DB_NAME}?authMechanism=PLAIN
volumes:
- repo-cache:/repo-cache
periphery:
image: ghcr.io/mbecker20/periphery:latest-aarch64
container_name: periphery-neon
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local}
networks:
- default
env_file: ./compose.env
ports:
- 8120:8120
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc:/proc
- ssl-certs:/etc/komodo/ssl
- repos:/etc/komodo/repos
- stacks:/etc/komodo/stacks
environment:
PERIPHERY_PASSKEYS: "XXXX"
PERIPHERY_SSL_ENABLED: true
PERIPHERY_INCLUDE_DISK_MOUNTS: /etc/hostname
volumes:
# Core
repo-cache:
# Periphery
ssl-certs:
repos:
stacks:
networks:
default: {}
sensitive-blueOP•12mo ago
sensitive-blueOP•12mo ago
I see these logs from the ferretdb container
2024-11-29T09:23:07.602Z WARN clientconn/conn.go:624 Response header: length: 121, id: 4, response_to: 1029542557, opcode: OP_MSG {"name":"// 34.140.231.8:47472 -> 172.18.0.3:27017 "}
2024-11-29T09:23:07.602Z WARN clientconn/conn.go:625 Response message:
{
"FlagBits": "[]",
"Checksum": int64(0),
"Sections": [
{
"Kind": 0,
"Document": {
"ok": 0.0,
"errmsg": "no such command: 'endSessions'",
"code": 59,
"codeName": "CommandNotFound",
},
},
],
}
{"name":"// 34.140.231.8:47472 -> 172.18.0.3:27017 "}
But when I see in the Neon monitoring dashboard the deletes, I see no logs on my containers and I am doing no deletes whatsoever