louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
56.75k stars 5.11k forks source link

Container crash when I delete 1 Monitor #4857

Closed godsking121 closed 2 months ago

godsking121 commented 3 months ago

⚠️ Please verify that this question has NOT been raised before.

🛡️ Security Policy

📝 Describe your problem

When i try to delete one of my Monitor its just stuck in delete and Crash After that i create new containor and When i restore from backup.json File and again delete same monitor again its stuck in delete and just crash

📝 Error Message(s) or Log

==> Performing startup jobs and maintenance tasks
==> Starting application with user 0 group 0
Welcome to Uptime Kuma
Your Node.js version: 18.20.2
2024-06-15T07:16:05Z [SERVER] INFO: Welcome to Uptime Kuma
2024-06-15T07:16:05Z [SERVER] INFO: Node Env: production
2024-06-15T07:16:05Z [SERVER] INFO: Inside Container: true
2024-06-15T07:16:05Z [SERVER] INFO: Importing Node libraries
2024-06-15T07:16:05Z [SERVER] INFO: Importing 3rd-party libraries
2024-06-15T07:16:08Z [SERVER] INFO: Creating express and socket.io instance
2024-06-15T07:16:08Z [SERVER] INFO: Server Type: HTTP
2024-06-15T07:16:08Z [SERVER] INFO: Importing this project modules
2024-06-15T07:16:08Z [NOTIFICATION] INFO: Prepare Notification Providers
2024-06-15T07:16:08Z [SERVER] INFO: Version: 1.23.13
2024-06-15T07:16:09Z [DB] INFO: Data Dir: ./data/
2024-06-15T07:16:09Z [SERVER] INFO: Connecting to the Database
2024-06-15T07:17:01Z [SERVER] INFO: Shutdown requested
2024-06-15T07:17:01Z [SERVER] INFO: Called signal: SIGTERM
Trace: Error [ERR_SERVER_NOT_RUNNING]: Server is not running.
    at new NodeError (node:internal/errors:405:5)
    at Server.close (node:net:2161:12)
    at Object.onceWrapper (node:events:631:28)
    at Server.emit (node:events:529:35)
    at emitCloseNT (node:net:2221:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
  code: 'ERR_SERVER_NOT_RUNNING'
}
    at process.unexpectedErrorHandler (/app/server/server.js:1905:13)
    at process.emit (node:events:517:28)
    at emit (node:internal/process/promises:149:20)
    at processPromiseRejections (node:internal/process/promises:283:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues

🐻 Uptime-Kuma Version

1.23.13

💻 Operating System and Arch

UBUNTU 22.04

🌐 Browser

Mozila

🖥️ Deployment Environment

services:
  uptimekuma:
    image: louislam/uptime-kuma:1
    container_name: uptimekuma
    ports:
      - 3001:3001
    volumes:
      - /mnt/nfs/uptimekuma_1/:/app/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped
CommanderStorm commented 3 months ago

If you use slow disks (such as NFS mont) that is a known problem. Please also be aware of the db-corruption issues for said storage documented in the wiki. We recommend to use local storage to store your database on.

Deleting a monitor is in V1 a somewhat expensive operation time whise. This may trigger the health check to restart your container depending on your retention and disk speed. Since v2s architecture we do store heartbeats in an aggregated fashion. This likely resolves your issue. See #4500 for the things that need to happen before v2.0 can be published.

rezzorix commented 2 months ago

All this NFS related issues should be closed with the hint towards "NFS is not supported". Not sure about the plan with NFS in v2, but for v1 just close and move on. Saves a lot of time.