Traccar on Docker (arm/v7 -> RaspberryPi4) not working / 100% CPU load

careyera year ago

Dear community,

today I tried deploying traccar via Docker to my HomeServer (Raspberry Pi4).
Regardless of what docker image/tag I use: 5.10-ubuntu, 5-ubuntu, 4.15-ubuntu ...

The container successfully starts, but the webfrontend is not reachable on the exposed port (in my case: 83 -> 8082).
When taking a look at the HOST computers CLI I can see via htop that all four CPU-cores are literally maxed out with JAVA tasks dealing with the traccar.xml.

In traccar.log I see only a single entry:

"INFO : HikariPool-1 : Starting ..."

my default.xml and traccar.xml are absolutely stock and unmodified.

Here is my docker-compose file:

version: "3" # Specify the version of Docker Compose syntax

services:
  # Service name: app
  app:
    image: traccar/traccar5.10-ubuntu # Specifies the Docker image to use for this service. Using the latest version of the traccar image.
    container_name: traccar # Name of the container that will be created
    hostname: traccar # Hostname of the container
    restart: unless-stopped # Restart policy. The container will restart unless it's explicitly stopped.

    ports: # Ports mapping from the host to the container
      - "83:8082" # Maps port 83 on the host to port 8082 in the container
      - "5000-5150:5000-5150" # Maps ports range 5000-5150 on the host to the same range in the container for TCP
      - "5000-5150:5000-5150/udp" # Maps ports range 5000-5150 on the host to the same range in the container for UDP

    volumes: # Defines volume mounts for the container
      - /DATA/AppData/traccar/logs:/opt/traccar/logs:rw # Mounts the logs directory from the host to the container with read and write permissions
      - /DATA/AppData/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro # Mounts the traccar.xml config file from the host to the container with read-only permissions

Any help is much appreciated!
Thanks!

Anton Tananaeva year ago

How much RAM does it have?

careyera year ago

Hey Anton,

thanks for your quick reply.
The Raspberry Pi4 that I am using has 4GB of RAM. The Server does provide other Services (NodeRED, Grafana, Portainer...) ... however without the Traccar container running CPU load is at approx 20% and the system is using 1,2-1,8GB of RAM... so half the RAM should be still available.

Traccar will only be used to track 3-4 devices so it will not work too hard.

Anton Tananaeva year ago

I guess the only way to know what's going on is by getting checking jstack output.

careyera year ago

From what I understand: In order to solve the problem we need to gain access to some java debug output, right? Can you guide me on how to achieve that? I am a newbie to docker: I know how to delpoy stuff and orchestrate things with Portainer. However gaining deep insight into containers is something I am not particularilly familiar with. Any help/guidance is much appreciated though.
It would be nice if the containers debug output would be a bit more verbose...

Anton Tananaeva year ago

I don't use docker much, so won't be able to help. You can try installing the normal version and see if it helps.

careyera year ago

I am running an older version (must be 4.x - the one with the legacy UI) on a seperate Pi natively. It works flawlessly.... However my aim was to consolidate all services to a single Pi to free up some Pi's for other projects!
Since my Homeserver is running Docker and Portainer anyways: Going with with docker seemed to be the way to go. :-)

Tracking Faso8 months ago

@careyer

change image: traccar/traccar5.10-ubuntu to image: traccar/traccar:debian