Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

# Bug Report: IPv6 Connection Issues Causing TMDB API Failures and High CPU Usage #4337

@TsinJu

Description

@TsinJu

Description

Bug Report: IPv6 Connection Issues Causing TMDB API Failures and High CPU Usage

Description

Seerr fails to fetch data from TMDB API when IPv6 addresses are returned first by DNS, resulting in 500 errors on discovery pages and high CPU usage from hanging connections. The forceIpv4First setting in Network configuration does not reliably prevent IPv6 connection attempts.

Environment

  • Seerr Version: develop-91261f6a61416b5daca6630e70fb9c5dd6396f3d
  • Installation Method: Docker (seerr/seerr:develop)
  • OS: Linux (Ubuntu)
  • Docker Network: Bridge network with IPv6 disabled
  • DNS Servers: 1.1.1.1, 9.9.9.9

Expected Behavior

When forceIpv4First: true is set in Network settings, Seerr should:

  1. Always attempt IPv4 connections first
  2. Successfully connect to TMDB API
  3. Load discovery pages without errors

Actual Behavior

  1. DNS returns IPv6 addresses first for api.themoviedb.org
  2. Node.js attempts IPv6 connections which fail
  3. TMDB API requests fail with errors:
    • [TMDB] Failed to fetch discover movies: socket hang up
    • [TMDB] Failed to fetch discover TV: Client network socket disconnected before secure TLS connection was established
  4. Discovery pages return HTTP 500 errors
  5. CPU usage spikes to 90%+ due to hanging CLOSE_WAIT connections

Logs

2026-02-13T08:34:49.301Z [debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: socket hang up"}
2026-02-13T08:34:49.310Z [debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: socket hang up"}
2026-02-13T08:34:49.408Z [debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: Client network socket disconnected before secure TLS connection was established"}

Network Connections

Running netstat inside container shows multiple CLOSE_WAIT connections:

tcp     1338      0 172.24.0.2:51848        99.84.152.8:443         CLOSE_WAIT  19/node
tcp        1      0 172.24.0.2:51866        99.84.152.8:443         CLOSE_WAIT  19/node
tcp        1      0 172.24.0.2:51838        99.84.152.8:443         CLOSE_WAIT  19/node

DNS Resolution

$ docker exec seerr nslookup api.themoviedb.org

Non-authoritative answer:
Name:   api.themoviedb.org
Address: 2600:9000:20e8:a200:c:174a:c400:93a1  # IPv6 returned FIRST
...
Name:   api.themoviedb.org
Address: 99.84.152.8  # IPv4 returned second

Workaround

Disable IPv6 in the Docker container using sysctls:

services:
  seerr:
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1
      - net.ipv6.conf.default.disable_ipv6=1
      - net.ipv6.conf.lo.disable_ipv6=1

Additional Notes

  • wget from within the container successfully connects to TMDB API (uses IPv4)
  • The issue occurs even with enable_ipv6: false set on Docker bridge network
  • Restarting the container temporarily resolves high CPU usage but doesn't fix the underlying connection issue

Suggested Fix

The forceIpv4First implementation should:

  1. Force Node.js HTTP/HTTPS clients to use family: 4 option
  2. Prevent IPv6 DNS resolution or deprioritize IPv6 addresses
  3. Properly handle DNS caching to respect the setting

Version

Latest dev version

Steps to Reproduce

Steps to Reproduce

Prerequisites

  • Docker environment with IPv6 networking available
  • DNS server that returns both IPv6 and IPv4 addresses for external domains

Step-by-Step Instructions

  1. Deploy Seerr using Docker Compose

    services:
      seerr:
        image: seerr/seerr:develop
        container_name: seerr
        init: true
        environment:
          - LOG_LEVEL=debug
          - TZ=Europe/Berlin
        ports:
          - 5055:5055
        volumes:
          - /path/to/appdata/seerr:/app/config
        restart: unless-stopped
        dns:
          - 1.1.1.1
          - 9.9.9.9
  2. Access Seerr UI

    • Navigate to http://localhost:5055
    • Complete initial setup
  3. Configure Network Settings

    • Go to Settings → Network
    • Enable Force IPv4 First option
    • Save settings
  4. Verify DNS Configuration

    docker exec seerr nslookup api.themoviedb.org
    • Confirm IPv6 addresses are returned before IPv4
  5. Attempt to Access Discovery Pages

    • Navigate to /discover/movies
    • Navigate to /discover/tv
    • Observe page loading behavior
  6. Check for Errors

    docker logs seerr --tail 100 | grep "TMDB"
    • Look for socket hang up errors
    • Look for TLS connection errors
  7. Monitor Resource Usage

    docker stats seerr --no-stream
    • Observe CPU usage (should spike to 90%+)
  8. Inspect Network Connections

    docker exec seerr sh -c 'ss -tunp | grep node'
    • Look for multiple CLOSE_WAIT connections to port 443

Expected Result

  • Discovery pages load successfully
  • No TMDB API errors in logs
  • Normal CPU usage (< 5%)

Actual Result

  • Discovery pages return HTTP 500 errors
  • Logs show TMDB API connection failures
  • CPU usage spikes to 90%+
  • Multiple hanging CLOSE_WAIT connections

Screenshots

No response

Logs

2026-02-13T08:31:37.694Z [info]: Starting Seerr version develop-91261f6a61416b5daca6630e70fb9c5dd6396f3d 
2026-02-13T08:31:38.466Z [debug][Settings Migrator]: Checking migration '0001_migrate_hostname.js'... 
2026-02-13T08:31:38.469Z [debug][Settings Migrator]: Checking migration '0002_migrate_apitokens.js'... 
2026-02-13T08:31:38.471Z [debug][Settings Migrator]: Checking migration '0003_emby_media_server_type.js'... 
2026-02-13T08:31:38.472Z [debug][Settings Migrator]: Checking migration '0004_migrate_region_setting.js'... 
2026-02-13T08:31:38.474Z [debug][Settings Migrator]: Checking migration '0005_migrate_network_settings.js'... 
2026-02-13T08:31:38.475Z [debug][Settings Migrator]: Checking migration '0006_remove_lunasea.js'... 
2026-02-13T08:31:38.477Z [debug][Settings Migrator]: Checking migration '0007_migrate_arr_tags.js'... 
2026-02-13T08:31:38.503Z [info][DNS Cache]: Initializing DNS Cache 
2026-02-13T08:31:38.505Z [info][Notifications]: Registered notification agents 
2026-02-13T08:31:38.557Z [info][Jobs]: Scheduled jobs loaded 
2026-02-13T08:31:38.753Z [info][Server]: Server ready on port 5055 
2026-02-13T08:32:00.010Z [debug][Jobs]: Starting scheduled job: Download Sync 
2026-02-13T08:34:49.286Z [debug][Jobs]: Starting scheduled job: Download Sync 
2026-02-13T08:34:49.301Z [debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: socket hang up"}
2026-02-13T08:34:49.310Z [debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: socket hang up"}
2026-02-13T08:34:49.314Z [debug][API]: Something went wrong retrieving trending items {"errorMessage":"[TMDB] Failed to fetch all trending: socket hang up"}
2026-02-13T08:34:49.319Z [debug][API]: Something went wrong retrieving the movie genre slider {"errorMessage":"[TMDB] Failed to fetch movie genres: socket hang up"}
2026-02-13T08:34:49.340Z [info][Jobs]: Starting scheduled job: Plex Watchlist Sync 
2026-02-13T08:34:49.408Z [debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: Client network socket disconnected before secure TLS connection was established"}
2026-02-13T08:34:49.409Z [debug][API]: Something went wrong retrieving the series genre slider {"errorMessage":"[TMDB] Failed to fetch TV genres: Client network socket disconnected before secure TLS connection was established"}
2026-02-13T08:34:49.415Z [debug][Jobs]: Starting scheduled job: Download Sync

Platform

desktop

Device

ThinkCentre M720q

Operating System

Unbuntu LTS (latest)

Browser

Firefox and Edge

Additional Context

Running the Image via Portainer

services:
  seerr:
    image: seerr/seerr:develop
    container_name: seerr
    init: true
    environment:
      - LOG_LEVEL=debug
      - TZ=Europe/Berlin
    ports:
      - 5055:5055
    volumes:
      - /opt/appdata/seerr:/app/config
    restart: unless-stopped
    user: "1000:1000"
    dns:
      - 1.1.1.1
      - 9.9.9.9
    networks:
      - seerr_network
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:5055/api/v1/status || exit 1
      start_period: 20s
      timeout: 3s
      interval: 15s
      retries: 3

networks:
  seerr_network:
    driver: bridge
    driver_opts:
      com.docker.network.bridge.name: br-seerr
    enable_ipv6: false

Code of Conduct

  • I agree to follow Overseerr's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions