Massive CPU usage #173

Open
opened 2026-04-05 16:16:52 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @PaulMcF1987 on 10/2/2025

Describe the bug
When running an import the CPU/Memory usage is crazy
The following pic was taken durng an import

Image

It shows
CPU usage at 100.5%
Memory at 71.5% 12GB of 16.8GB used
swap at 12.2%

Needless to say, at this CPU usage, my system crashed and I was getting alerts from my system monitor telling me that my services were all unavailable

The CPU eventually settled slightly to

Image

this shows
CPU usage at 71.1% but varying
Memory at 72% 12.1GB of 16.8GB used
swap at 12.4%

I checked the same figures earlier and noted them down (I didnt take a screenshot)

CPU usage - 27.3%
Memory - 55% - 9.2GB of 16.8GB used
Swap - 0%

So there is a massive jump in CPU usage of, over 40%.
This is the first I have checked but since deploying Open Archiver, yesterday, I have been noticing issues with the server.

Image

Is there anything I should be doing to combat these issues?

System:

  • Open Archiver Version:

Relevant logs:
Any relevant logs (Redact sensitive information)

Additional context
Add any other context about the problem here.

Update
The app was sitting idol and I took the following screenshot of resource usage

Image

I then stopped the container (docker compose down) and this is the screenshot straight after showing a big change in resource usage

Image

and 2 mins later

Image

What is causing the massive CPU and spikes? How do I combat this issue?
The Memory is about 5gb lower when the container is not running and CPU is 50% less

My YML

version: '3.8'

services:
  open-archiver:
    image: logiclabshq/open-archiver:latest
    container_name: open-archiver
    restart: unless-stopped
    ports:
      - '30080:3000' # Frontend
      - '30082:4000' # Backend API (if needed)
    env_file:
      - .env
    volumes:
      - archiver-data:/var/data/open-archiver
    depends_on:
      - postgres
      - valkey
      - meilisearch
    networks:
      - open-archiver-net

  postgres:
    image: postgres:17-alpine
    container_name: postgres
    restart: unless-stopped
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    ports:
      - '30081:5432'   # host:container mapping for firewall access
    volumes:
      - pgdata:/var/lib/postgresql/data
    networks:
      - open-archiver-net

  valkey:
    image: valkey/valkey:8-alpine
    container_name: valkey
    restart: unless-stopped
    command: valkey-server --requirepass ${REDIS_PASSWORD}
    ports:
      - '9306:6379'  # optional, expose if you need host access
    volumes:
      - valkeydata:/data
    networks:
      - open-archiver-net

  meilisearch:
    image: getmeili/meilisearch:v1.15
    container_name: meilisearch
    restart: unless-stopped
    environment:
      MEILI_MASTER_KEY: ${MEILI_MASTER_KEY}
    ports:
      - '9307:7700'   # optional, expose if needed
    volumes:
      - meilidata:/meili_data
    networks:
      - open-archiver-net

  tika:
    image: apache/tika:3.2.2.0-full
    container_name: tika
    restart: always
    ports:
      - '9308:9998'   # optional, expose for Tika API
    networks:
      - open-archiver-net

volumes:
  pgdata:
    driver: local
  valkeydata:
    driver: local
  meilidata:
    driver: local
  archiver-data:
    driver: local

networks:
  open-archiver-net:
    driver: bridge

my .env

# --- Application Settings ---
NODE_ENV=production
PORT_BACKEND=30082
PORT_FRONTEND=30080
SYNC_FREQUENCY=0 * * * *

# --- Docker Compose Service Configuration ---
# PostgreSQL
POSTGRES_DB=open_archive
POSTGRES_USER=Admin
POSTGRES_PASSWORD=password
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}

# Meilisearch
MEILI_MASTER_KEY=meli_master
MEILI_HOST=http://meilisearch:7700
MEILI_INDEXING_BATCH=100

# Redis / Valkey
REDIS_HOST=valkey
REDIS_PORT=6379
REDIS_PASSWORD=redis_pass
REDIS_TLS_ENABLED=false

# --- Storage Settings ---
STORAGE_TYPE=local
BODY_SIZE_LIMIT=100M

# Local storage path (mapped to Docker volume)
STORAGE_LOCAL_ROOT_PATH=/var/data/open-archiver

# --- Security & Authentication ---
JWT_SECRET=secret_key
JWT_EXPIRES_IN=7d

# Master Encryption Key for sensitive data (32-byte hex)
ENCRYPTION_KEY=4random_key

# Apache Tika
#TIKA_URL=http://tika:9998
``
*Originally created by @PaulMcF1987 on 10/2/2025* **Describe the bug** When running an import the CPU/Memory usage is crazy The following pic was taken durng an import <img width="1743" height="955" alt="Image" src="https://github.com/user-attachments/assets/eb0d378e-5ab0-4df7-a492-9ca1a47a7dcc" /> It shows CPU usage at 100.5% Memory at 71.5% 12GB of 16.8GB used swap at 12.2% Needless to say, at this CPU usage, my system crashed and I was getting alerts from my system monitor telling me that my services were all unavailable The CPU eventually settled slightly to <img width="1748" height="942" alt="Image" src="https://github.com/user-attachments/assets/414cc2dd-f9ac-46aa-a9d1-fc586eace082" /> this shows CPU usage at 71.1% but varying Memory at 72% 12.1GB of 16.8GB used swap at 12.4% I checked the same figures earlier and noted them down (I didnt take a screenshot) CPU usage - 27.3% Memory - 55% - 9.2GB of 16.8GB used Swap - 0% So there is a massive jump in CPU usage of, over 40%. This is the first I have checked but since deploying `Open Archiver`, yesterday, I have been noticing issues with the server. <img width="609" height="777" alt="Image" src="https://github.com/user-attachments/assets/c31733a5-8674-4595-8628-6c1d36f7408b" /> Is there anything I should be doing to combat these issues? **System:** - Open Archiver Version: **Relevant logs:** Any relevant logs (Redact sensitive information) **Additional context** Add any other context about the problem here. Update The app was sitting idol and I took the following screenshot of resource usage <img width="1750" height="945" alt="Image" src="https://github.com/user-attachments/assets/ace0e30e-eed5-471c-a7a5-c9576a7701da" /> I then stopped the container (docker compose down) and this is the screenshot straight after showing a big change in resource usage <img width="1755" height="939" alt="Image" src="https://github.com/user-attachments/assets/59b86f35-437c-416b-b548-b8c73c35f95e" /> and 2 mins later <img width="1748" height="872" alt="Image" src="https://github.com/user-attachments/assets/1151a67b-4ef4-4da4-8ceb-4b9d29e3294a" /> What is causing the massive CPU and spikes? How do I combat this issue? The Memory is about 5gb lower when the container is not running and CPU is 50% less My YML ``` version: '3.8' services: open-archiver: image: logiclabshq/open-archiver:latest container_name: open-archiver restart: unless-stopped ports: - '30080:3000' # Frontend - '30082:4000' # Backend API (if needed) env_file: - .env volumes: - archiver-data:/var/data/open-archiver depends_on: - postgres - valkey - meilisearch networks: - open-archiver-net postgres: image: postgres:17-alpine container_name: postgres restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - '30081:5432' # host:container mapping for firewall access volumes: - pgdata:/var/lib/postgresql/data networks: - open-archiver-net valkey: image: valkey/valkey:8-alpine container_name: valkey restart: unless-stopped command: valkey-server --requirepass ${REDIS_PASSWORD} ports: - '9306:6379' # optional, expose if you need host access volumes: - valkeydata:/data networks: - open-archiver-net meilisearch: image: getmeili/meilisearch:v1.15 container_name: meilisearch restart: unless-stopped environment: MEILI_MASTER_KEY: ${MEILI_MASTER_KEY} ports: - '9307:7700' # optional, expose if needed volumes: - meilidata:/meili_data networks: - open-archiver-net tika: image: apache/tika:3.2.2.0-full container_name: tika restart: always ports: - '9308:9998' # optional, expose for Tika API networks: - open-archiver-net volumes: pgdata: driver: local valkeydata: driver: local meilidata: driver: local archiver-data: driver: local networks: open-archiver-net: driver: bridge ``` my .env ``` # --- Application Settings --- NODE_ENV=production PORT_BACKEND=30082 PORT_FRONTEND=30080 SYNC_FREQUENCY=0 * * * * # --- Docker Compose Service Configuration --- # PostgreSQL POSTGRES_DB=open_archive POSTGRES_USER=Admin POSTGRES_PASSWORD=password DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} # Meilisearch MEILI_MASTER_KEY=meli_master MEILI_HOST=http://meilisearch:7700 MEILI_INDEXING_BATCH=100 # Redis / Valkey REDIS_HOST=valkey REDIS_PORT=6379 REDIS_PASSWORD=redis_pass REDIS_TLS_ENABLED=false # --- Storage Settings --- STORAGE_TYPE=local BODY_SIZE_LIMIT=100M # Local storage path (mapped to Docker volume) STORAGE_LOCAL_ROOT_PATH=/var/data/open-archiver # --- Security & Authentication --- JWT_SECRET=secret_key JWT_EXPIRES_IN=7d # Master Encryption Key for sensitive data (32-byte hex) ENCRYPTION_KEY=4random_key # Apache Tika #TIKA_URL=http://tika:9998 ``
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OpenArchiver#173