Skip to content

Insufficient disk space not detected when remote file size unavailable #181

@rtuszik

Description

@rtuszik

This is expected behaviour as of now. There are various reasons that could lead to a failing remote file size check, so I did not want to prevent this from downloading the index.

I agree however, that this does make the check unreliable.


Original Issue Report:

Last night my DNS went down (as it does every night due to DSL reconnect), resulting in the free space check to get skipped. The download began regardless of there not being enough storage which in the end filled up my docker volume completely (0 bytes left) and in the end crashing the container (along with a few other contains which didn't like the 0 bytes free storage lol).

Log:

2025-11-02 03:08:39,256 - root - INFO - Photon Manager starting...
2025-11-02 03:08:39,256 - root - INFO - Running initial setup...
2025-11-02 03:08:39,585 - root - INFO - No APPRISE_URLS set, skipping notification.
2025-11-02 03:08:39,585 - root - INFO - === CONFIG VARIABLES ===
2025-11-02 03:08:39,585 - root - INFO - UPDATE_STRATEGY: SEQUENTIAL
2025-11-02 03:08:39,585 - root - INFO - UPDATE_INTERVAL: 90d
2025-11-02 03:08:39,585 - root - INFO - REGION: None
2025-11-02 03:08:39,585 - root - INFO - FORCE_UPDATE: False
2025-11-02 03:08:39,586 - root - INFO - PHOTON_PARAMS: None
2025-11-02 03:08:39,586 - root - INFO - JAVA_PARAMS: None
2025-11-02 03:08:39,586 - root - INFO - LOG_LEVEL: INFO
2025-11-02 03:08:39,586 - root - INFO - BASE_URL: https://r2.koalasec.org/public
2025-11-02 03:08:39,586 - root - INFO - SKIP_MD5_CHECK: False
2025-11-02 03:08:39,586 - root - INFO - INITIAL_DOWNLOAD: True
2025-11-02 03:08:39,586 - root - INFO - === END CONFIG VARIABLES ===
2025-11-02 03:08:39,586 - root - INFO - Validating environment variables...
2025-11-02 03:08:39,587 - root - INFO - Environment variables are valid.
2025-11-02 03:08:39,587 - root - INFO - Starting initial download using sequential strategy
2025-11-02 03:08:39,587 - root - INFO - Note: Initial download will use sequential strategy regardless of config setting
2025-11-02 03:08:39,587 - root - INFO - Starting sequential download process...
2025-11-02 03:08:39,587 - root - INFO - Deleting old index...
2025-11-02 03:08:47,598 - root - WARNING - Could not determine remote file size for https://r2.koalasec.org/public/photon-db-planet-0.7OS-latest.tar.bz2: HTTPSConnectionPool(host='r2.koalasec.org', port=443): Max retries exceeded with url: /public/photon-db-planet-0.7OS-latest.tar.bz2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fbdef0bac30>: Failed to resolve 'r2.koalasec.org' ([Errno -3] Temporary failure in name resolution)"))
2025-11-02 03:08:47,598 - root - WARNING - Could not determine download size, proceeding without space check
2025-11-02 03:08:47,598 - root - INFO - Downloading new index and MD5 checksum...
2025-11-02 03:08:55,608 - root - WARNING - Download attempt 1 failed: HTTPSConnectionPool(host='r2.koalasec.org', port=443): Max retries exceeded with url: /public/photon-db-planet-0.7OS-latest.tar.bz2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fbdef0bb110>: Failed to resolve 'r2.koalasec.org' ([Errno -3] Temporary failure in name resolution)"))
2025-11-02 03:08:55,608 - root - INFO - Waiting 1s before retry...
2025-11-02 03:08:56,608 - root - INFO - Retrying download (attempt 2/3)...
2025-11-02 03:09:04,593 - root - INFO - Starting download of 116.98GB to photon-db-latest.tar.bz2
2025-11-02 03:09:14,642 - root - INFO - Download progress: 0.2% (0.23GB / 116.98GB) - 196.4 Mbps - ETA: 1h 25m
# [...]
2025-11-02 04:00:19,272 - root - INFO - Download progress: 57.9% (67.72GB / 116.98GB) - 104.2 Mbps - ETA: 1h 7m
# At this point the storage ran full and the container crashed without another message.

Compose file:

services:
  # [...]
  dawarich_photon:
    image: rtuszik/photon-docker:latest
    container_name: dawarich_photon
    restart: unless-stopped
    volumes:
      - /volume1/docker-hdd/photon:/photon/photon_data # seemingly ignored
    environment:
      - UPDATE_STRATEGY=SEQUENTIAL
      - UPDATE_INTERVAL=90d
      - FORCE_UPDATE=false
      - BASE_URL=https://r2.koalasec.org/public

Originally posted by @MadWalnut in #174

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions