maloja icon indicating copy to clipboard operation
maloja copied to clipboard

Maloja frequently using all cpu resources to the point of getting errors 504 (Gateway Time-Out)

Open alscaldas opened this issue 7 months ago • 2 comments

Hello,

Maloja has been frequently using all of the cpu resources lately, to the point that I start to get 504 errors. It is an apparently random behavior, since it works fine most of the time and then it just gets slow to the point to being unusable, working again only if I restart the docker container.

I'm using a couple of tools to scrobble. Sometimes MPD + rescrobbled or Feishin (Navidrome) + Multi-scrobbler when on my desktop and Symphonium (also Navidrome + Multi-scrobbler) when using my Android phone.

Is there anything I can do to solve this issue? Maybe reinstall everything (although I really wouldn't like to lose my scrobble history) would work?

I'd appreciate any suggestion.

Currently installed Maloja version: 3.2.2 (Docker) Latest recommended Maloja version: 3.2.2

Before restarting the container

docker stats --no-stream maloja 
CONTAINER ID   NAME      CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O        PIDS
d7497450d92a   maloja    130.52%   143.6MiB / 15.45GiB   0.91%     26.6MB / 30.7MB   149MB / 15.4MB   35

docker stats --no-stream maloja 
CONTAINER ID   NAME      CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O        PIDS
d7497450d92a   maloja    132.89%   139.8MiB / 15.45GiB   0.88%     26.6MB / 30.7MB   149MB / 15.4MB   35

After restarting the container

docker stats --no-stream maloja 
CONTAINER ID   NAME      CPU %     MEM USAGE / LIMIT     MEM %     NET I/O         BLOCK I/O        PIDS
d7497450d92a   maloja    0.01%     82.75MiB / 15.45GiB   0.52%     15kB / 3.07kB   26.4MB / 618kB   30

cat /home/myuser/Docker/maloja/mljdata/settings.ini

[MALOJA]
lastfm_api_key = xxxxxx
spotify_api_id = xxxxxxx
spotify_api_secret = xxxxxxx
audiodb_api_key = XXXXX
lastfm_username = xxxx
lastfm_password = xxxx
lastfm_api_secret = xxxxx
timezone = -7
charts_display_tiles = True
send_stats = False
fancy_placeholder_art = True
show_play_number_on_tiles = True
directory_config = /mljdata
db_max_memory = 50
use_global_cache = True
discourage_cpu_heavy_stats = True
use_db_cache = True
use_request_cache = True

docker-compose.yaml

version: "3"
services:
  baikal:
    image: krateng/maloja:latest
    container_name: maloja
    restart: unless-stopped
    environment:
      - TZ=XXX/XXX
      - MALOJA_SKIP_SETUP=yes
      - MALOJA_DATA_DIRECTORY=/mljdata
      - MALOJA_FORCE_PASSWORD=xxxx
      - PUID=1000
      - PGID=1000
    ports:
      - "42010:42010"
    volumes:
      - /home/myuser/Docker/maloja/mljdata:/mljdata

alscaldas avatar Jul 18 '24 17:07 alscaldas