rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
1.82k stars 81 forks source link

[Bug] Periodic Writes when idle even with scheduler disabled #1112

Open guicattani opened 3 weeks ago

guicattani commented 3 weeks ago

RomM version 3.4

Describe the bug I get periodic writes while RomM is idle, but I have all Schedulers (except reescan on file change) turned off These Writes take from 7 to 10 minutes on my machine. image

This has been going on for days so I don't think it's related to library maintenance

To Reproduce Set ENV to

ENABLE_RESCAN_ON_FILESYSTEM_CHANGE=true
ENABLE_SCHEDULED_RESCAN=false
ENABLE_SCHEDULED_UPDATE_MAME_XML=false
ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB=false

Open Grafana (or similar) and see that the container keeps writing something.

Expected behavior RomM should be idle until interacted with.

Thank you very much for this project! :heart: It works great other than that :)

adamantike commented 3 weeks ago

Thank you for reporting this issue!

I have checked my container stats, and don't get this behavior. However, there are a few things you can help us with to find the culprit:

  1. You can run a separate container for Redis/Valkey, to determine if the I/O comes from it instead of the application container. For that, you will need to add a new service to the Docker Compose configuration, and set the REDIS_HOST environment variable in the romm service:
services:
  romm:
    # ...
    depends_on:
      romm-db:
        condition: service_healthy
        restart: true
      romm-valkey:
        condition: service_healthy
    env_file: ./env
    environment:
      # ...
      - REDIS_HOST=romm-valkey
    volumes:
        # No need to have the Redis volume here anymore.

  romm-valkey:
    image: valkey/valkey:7.2.6
    container_name: romm-valkey
    restart: unless-stopped
    volumes:
      - romm-valkey:/data
    healthcheck:
      test: ["CMD", "valkey-cli", "ping"]
      interval: 20s
      timeout: 3s

volumes:
  romm-valkey:
  1. You can test the latest alpha image for the container, which is 3.5.0-alpha.1

Let us know if you need more help on any of these steps. It's also very useful to check Docker Container logs for the stack, in case they can also be matched with the timestamps where the I/O occurs.