Hi,
Our server admin just reported that a postgres service is maxing out the server’s CPU. Turn out it was one of the processes inside the nocobase postgres container. I restarted the container, but the issue came back:
$ sudo docker top nocobase-postgres-1
UID PID PPID C STIME TTY TIME CMD
psaadm 1857606 1857581 0 12:54 ? 00:00:00 postgres -c wal_level=logical
psaadm 1892055 1857606 0 15:13 ? 00:00:00 postgres: checkpointer
psaadm 1892056 1857606 0 15:13 ? 00:00:00 postgres: background writer
psaadm 1892065 1857606 0 15:13 ? 00:00:00 postgres -c wal_level=logical
psaadm 1892066 1857606 0 15:13 ? 00:00:00 postgres: walwriter
psaadm 1892067 1857606 0 15:13 ? 00:00:00 postgres: autovacuum launcher
psaadm 1892068 1857606 0 15:13 ? 00:00:00 postgres: logical replication launcher
psaadm 1892073 1857606 3 15:13 ? 00:00:46 postgres -c wal_level logical
psaadm 1892269 1857606 99 15:13 ? 05:06:48 postgres -c wal_level=logical
The docker-compose.yml:
version: "3"
networks:
nocobase:
driver: bridge
services:
app:
image: registry.cn-shanghai.aliyuncs.com/nocobase/nocobase:latest
networks:
- nocobase
depends_on:
- postgres
environment:
APP_KEY: your-secret-key
DB_DIALECT: postgres
DB_HOST: postgres
DB_DATABASE: nocobase
DB_USER: nocobase
DB_PASSWORD: nocobase
TZ: Asia/Shanghai
volumes:
- ./storage:/app/nocobase/storage
ports:
- "13000:80"
postgres:
image: registry.cn-shanghai.aliyuncs.com/nocobase/postgres:16
restart: always
command: postgres -c wal_level=logical
environment:
POSTGRES_USER: nocobase
POSTGRES_DB: nocobase
POSTGRES_PASSWORD: nocobase
volumes:
- ./storage/db/postgres:/var/lib/postgresql/data
networks:
- nocobase
ports:
- "5432:5432"
There’s another postgres container running on port 5431, postgres version 13.
Any suggestions?