Cron Task, some of them fail due to password authentication failed?

I’ve noticed inside Monitoring / Cron Tasks area as the admin, some task fails with the error:

pq: password authentication failed for user “gitea”
image

But everything else works? Users can be created, issues, wiki etc.

What I can see in the console output.

2023/12/31 14:59:13 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/events for 192.168.0.30:0, 200 OK in 714092.8ms @ events/events.go:18(events.Events)
2023/12/31 14:59:13 ...rvices/cron/tasks.go:152:GetTask() [I] Getting cleanup_actions in &{{0 0} cleanup_actions 0xc004389710 0x241c0a0 error pq: password authentication failed for user "gitea"  2 2023-12-31 00:00:00.000501317 +0100 CET m=+13750.428375510}
2023/12/31 14:59:13 ...eb/routing/logger.go:102:func1() [I] router: completed POST /admin for 192.168.0.30:0, 303 See Other in 4.9ms @ admin/admin.go:141(admin.DashboardPost)
2023/12/31 14:59:13 ...s/actions/cleanup.go:29:CleanupArtifacts() [I] Found 0 expired artifacts
2023/12/31 14:59:13 ...eb/routing/logger.go:102:func1() [I] router: completed GET /admin/monitor/cron for 192.168.0.30:0, 200 OK in 11.3ms @ admin/admin.go:175(admin.CronTasks)
2023/12/31 14:59:16 ...eb/routing/logger.go:68:func1() [I] router: polling   GET /user/events for 192.168.0.30:0, elapsed 3058.4ms @ events/events.go:18(events.Events)

I decided to test the cron tasks again today, and now they work.
image

Why? I have not done any changes since the original post.

My compose script

version: "3.9"

services:
  app:
    user: "1000:1000"
    restart: unless-stopped
    image: "gitea/gitea:1.21.3-rootless"
    networks:
      - trusted
    volumes:
      - /var/docker_data/gitea/data:/var/lib/gitea
      - /var/docker_data/gitea/config:/etc/gitea
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
        - GITEA__database__DB_TYPE=postgres
        - GITEA__database__HOST=db
        - GITEA__database__NAME=gitea
        - GITEA__database__USER=gitea
        - GITEA__database__PASSWD=secret
    depends_on:
      - db
    deploy:
      resources:
        limits:
          memory: 512M
          
  db:
    user: "1000:1000"
    restart: unless-stopped
    image: "postgres:14"
    networks:
      - trusted
    volumes:
      - /var/docker_data/gitea/db:/var/lib/postgresql/data
    environment:
        - POSTGRES_DB=gitea
        - POSTGRES_USER=gitea
        - POSTGRES_PASSWORD=secret
    deploy:
      resources:
        limits:
          memory: 512M

networks:
  trusted:
    external: true