Skip to content

[BUG] Docker healthcheck kills updating container #153

@xathon

Description

@xathon

Describe the bug
When I start the container, the initial download starts. After somewhere around 5-10% of completed download, the container will crash and restart.

To Reproduce
Steps to reproduce the behavior:

  • Start the container
  • Attach to docker logs
  • Observe restarts

Expected behavior
The download should complete without issue or communicate the exact nature of the error in the logs.

photon-docker configuration:

services:
  photon:
    hostname: photon
    image: rtuszik/photon-docker:latest
    container_name: photon
    environment:
      - UPDATE_STRATEGY=SEQUENTIAL
      - UPDATE_INTERVAL=30d
      - LOG_LEVEL=DEBUG
      # - COUNTRY_CODE=zw  # Optional: country-specific index
    restart: unless-stopped
    volumes:
      - ./photon_data:/photon/data
    networks:
      web: null
      dawarich: null
networks:
  web:
    external: true
  dawarich:
    external: true

System Info

  • Host OS: Debian 12
  • Host Type: VM
  • Hardware details:
    • CPU: i5-13500
    • Available RAM: 20GB (for the VM)
    • Storage Type: SSD /virtual disk
    • Storage Size: 300GB virtual volume mounted to ./photon_data

Debug Logs

photon  | 2025-10-01 10:53:05,243 - root - INFO - Photon Manager starting...
photon  | 2025-10-01 10:53:05,243 - root - INFO - Running initial setup...
photon  | 2025-10-01 10:53:05,453 - root - INFO - No APPRISE_URLS set, skipping notification.photon  | 2025-10-01 10:53:05,453 - root - DEBUG - Entrypoint setup called
photon  | 2025-10-01 10:53:05,453 - root - INFO - === CONFIG VARIABLES ===
photon  | 2025-10-01 10:53:05,453 - root - INFO - UPDATE_STRATEGY: SEQUENTIAL
photon  | 2025-10-01 10:53:05,453 - root - INFO - UPDATE_INTERVAL: 30d
photon  | 2025-10-01 10:53:05,453 - root - INFO - REGION: None
photon  | 2025-10-01 10:53:05,453 - root - INFO - FORCE_UPDATE: False
photon  | 2025-10-01 10:53:05,453 - root - DEBUG - FILE_URL: None
photon  | 2025-10-01 10:53:05,453 - root - INFO - PHOTON_PARAMS: None
photon  | 2025-10-01 10:53:05,453 - root - INFO - JAVA_PARAMS: None
photon  | 2025-10-01 10:53:05,453 - root - INFO - LOG_LEVEL: DEBUG
photon  | 2025-10-01 10:53:05,453 - root - INFO - BASE_URL: https://r2.koalasec.org/public
photon  | 2025-10-01 10:53:05,454 - root - INFO - SKIP_MD5_CHECK: False
photon  | 2025-10-01 10:53:05,454 - root - INFO - === END CONFIG VARIABLES ===
photon  | 2025-10-01 10:53:05,454 - root - INFO - Validating environment variables...
photon  | 2025-10-01 10:53:05,454 - root - INFO - Environment variables are valid.
photon  | 2025-10-01 10:53:05,454 - root - INFO - Starting initial download using sequential strategy
photon  | 2025-10-01 10:53:05,454 - root - INFO - Note: Initial download will use sequential strategy regardless of config setting
photon  | 2025-10-01 10:53:05,454 - root - INFO - Starting sequential download process...
photon  | 2025-10-01 10:53:05,454 - root - INFO - Deleting old index...
photon  | 2025-10-01 10:53:05,454 - root - DEBUG - Temporary directory /photon/data/temp exists. Attempting to remove it.
photon  | 2025-10-01 10:53:05,478 - root - DEBUG - Successfully removed directory: /photon/data/temp
photon  | 2025-10-01 10:53:05,478 - root - DEBUG - Creating temporary directory: /photon/data/temp
photon  | 2025-10-01 10:53:05,582 - root - INFO - Sequential update space requirements:
photon  | 2025-10-01 10:53:05,584 - root - INFO -   Download size: 109.25 GB
photon  | 2025-10-01 10:53:05,584 - root - INFO -   Estimated extracted size: 178.07 GB
photon  | 2025-10-01 10:53:05,584 - root - INFO -   Temp space needed: 287.32 GB
photon  | 2025-10-01 10:53:05,584 - root - INFO -   Temp space available: 349.22 GB
photon  | 2025-10-01 10:53:05,585 - root - INFO - Sufficient disk space available for update
photon  | 2025-10-01 10:53:05,585 - root - INFO - Downloading new index and MD5 checksum...
photon  | 2025-10-01 10:53:05,908 - root - INFO - Starting download of 109.25GB to photon-db-latest.tar.bz2
photon  | 2025-10-01 10:53:15,915 - root - INFO - Download progress: 0.2% (0.23GB / 109.25GB) - 201.1 Mbps - ETA: 1h 17m
photon  | 2025-10-01 10:53:25,916 - root - INFO - Download progress: 0.5% (0.54GB / 109.25GB) - 261.7 Mbps - ETA: 0h 59m
photon  | 2025-10-01 10:53:35,916 - root - INFO - Download progress: 0.7% (0.75GB / 109.25GB) - 178.0 Mbps - ETA: 1h 27m
photon  | 2025-10-01 10:53:45,916 - root - INFO - Download progress: 0.9% (0.99GB / 109.25GB) - 209.6 Mbps - ETA: 1h 13m
photon  | 2025-10-01 10:53:55,917 - root - INFO - Download progress: 1.1% (1.24GB / 109.25GB) - 217.8 Mbps - ETA: 1h 11m
photon  | 2025-10-01 10:54:05,919 - root - INFO - Download progress: 1.4% (1.49GB / 109.25GB) - 208.9 Mbps - ETA: 1h 13m
photon  | 2025-10-01 10:54:15,924 - root - INFO - Download progress: 1.6% (1.78GB / 109.25GB) - 252.4 Mbps - ETA: 1h 0m
photon  | 2025-10-01 10:54:25,930 - root - INFO - Download progress: 1.9% (2.04GB / 109.25GB) - 221.1 Mbps - ETA: 1h 9m
photon  | 2025-10-01 10:54:35,929 - root - INFO - Download progress: 2.1% (2.34GB / 109.25GB) - 256.9 Mbps - ETA: 0h 59m
photon  | 2025-10-01 10:54:45,930 - root - INFO - Download progress: 2.4% (2.57GB / 109.25GB) - 202.5 Mbps - ETA: 1h 15m
photon  | 2025-10-01 10:54:55,931 - root - INFO - Download progress: 2.6% (2.80GB / 109.25GB) - 195.7 Mbps - ETA: 1h 17m
photon  | 2025-10-01 10:55:05,931 - root - INFO - Download progress: 2.7% (3.00GB / 109.25GB) - 170.3 Mbps - ETA: 1h 29m
photon  | 2025-10-01 10:55:15,932 - root - INFO - Download progress: 2.9% (3.21GB / 109.25GB) - 181.3 Mbps - ETA: 1h 23m
photon  | 2025-10-01 10:55:25,932 - root - INFO - Download progress: 3.1% (3.41GB / 109.25GB) - 168.5 Mbps - ETA: 1h 29m
photon  | 2025-10-01 10:55:35,932 - root - INFO - Download progress: 3.3% (3.66GB / 109.25GB) - 215.9 Mbps - ETA: 1h 10m
photon  | 2025-10-01 10:55:45,955 - root - INFO - Download progress: 3.6% (3.92GB / 109.25GB) - 226.8 Mbps - ETA: 1h 6m
photon  | 2025-10-01 10:55:55,958 - root - INFO - Download progress: 3.8% (4.17GB / 109.25GB) - 216.0 Mbps - ETA: 1h 9m
photon  | 2025-10-01 10:56:05,958 - root - INFO - Download progress: 4.0% (4.38GB / 109.25GB) - 174.0 Mbps - ETA: 1h 26m
photon  | 2025-10-01 10:56:15,958 - root - INFO - Download progress: 4.2% (4.63GB / 109.25GB) - 219.6 Mbps - ETA: 1h 8m
photon  | 2025-10-01 10:56:25,958 - root - INFO - Download progress: 4.5% (4.89GB / 109.25GB) - 217.7 Mbps - ETA: 1h 8m
photon  | 2025-10-01 10:56:35,958 - root - INFO - Download progress: 4.7% (5.14GB / 109.25GB) - 219.0 Mbps - ETA: 1h 8m
photon  | 2025-10-01 10:56:45,959 - root - INFO - Download progress: 5.0% (5.43GB / 109.25GB) - 249.8 Mbps - ETA: 0h 59m
photon  | 2025-10-01 10:56:55,959 - root - INFO - Download progress: 5.2% (5.73GB / 109.25GB) - 255.5 Mbps - ETA: 0h 58m
photon  | 2025-10-01 10:57:05,959 - root - INFO - Download progress: 5.5% (6.03GB / 109.25GB) - 260.0 Mbps - ETA: 0h 56m
photon  | 2025-10-01 10:57:15,959 - root - INFO - Download progress: 5.8% (6.32GB / 109.25GB) - 245.7 Mbps - ETA: 0h 59m
photon  | 2025-10-01 10:57:25,959 - root - INFO - Download progress: 6.1% (6.62GB / 109.25GB) - 256.8 Mbps - ETA: 0h 57m
photon  | 2025-10-01 10:57:35,959 - root - INFO - Download progress: 6.3% (6.92GB / 109.25GB) - 260.8 Mbps - ETA: 0h 56m
photon  | 2025-10-01 10:57:45,968 - root - INFO - Download progress: 6.6% (7.22GB / 109.25GB) - 259.0 Mbps - ETA: 0h 56m
photon  | 2025-10-01 10:57:55,968 - root - INFO - Download progress: 6.9% (7.51GB / 109.25GB) - 245.0 Mbps - ETA: 0h 59m
photon  | Traceback (most recent call last):
photon  |   File "<frozen runpy>", line 198, in _run_module_as_main
photon  |   File "<frozen runpy>", line 88, in _run_code
photon  |   File "/photon/src/process_manager.py", line 309, in <module>
photon  |     manager.run()
photon  |   File "/photon/src/process_manager.py", line 295, in run
photon  |     self.run_initial_setup()
photon  |   File "/photon/src/process_manager.py", line 83, in run_initial_setup
photon  |     result = subprocess.run(["uv", "run", "-m", "src.entrypoint", "setup"], check=False, cwd="/photon")
photon  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
photon  |   File "/usr/lib/python3.12/subprocess.py", line 550, in run
photon  |     stdout, stderr = process.communicate(input, timeout=timeout)
photon  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
photon  |   File "/usr/lib/python3.12/subprocess.py", line 1201, in communicate
photon  |     self.wait()
photon  |   File "/usr/lib/python3.12/subprocess.py", line 1264, in wait
photon  |     return self._wait(timeout=timeout)
photon  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
photon  |   File "/usr/lib/python3.12/subprocess.py", line 2053, in _wait
photon  |     (pid, sts) = self._try_wait(0)
photon  |                  ^^^^^^^^^^^^^^^^^
photon  |   File "/usr/lib/python3.12/subprocess.py", line 2011, in _try_wait
photon  |     (pid, sts) = os.waitpid(self.pid, wait_flags)
photon  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
photon  | TypeError: PhotonManager.handle_shutdown() takes 2 positional arguments but 3 were
given
photon exited with code 1 (restarting)
photon  | 2025-10-01 10:58:02,859 - root - INFO - Photon Manager starting...
photon  | 2025-10-01 10:58:02,859 - root - INFO - Running initial setup...

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions