Requirements for forwarder Mode

bastyjuice 2 months ago

Hello Traccar community,

I have a question regarding a configuration/application example. I would like to run Traccar as a listener in forwarder mode. Unfortunately, I haven’t been able to find any information about how the system performs in this setup — for example, how it behaves with different reporting intervals (e.g., 10 seconds vs. 2 seconds) and varying numbers of devices (e.g., 500 vs. 1500 devices).

I was also considering running the whole setup in Docker, including Traccar, MariaDB, Watchtower, and Autoheal.

Has anyone had experience with this kind of setup or can share some insights on performance and scalability?

Thank you in advance!

Anton Tananaev 2 months ago

As long as your ingestion service can handle the data, I don't see any problem, especially if we're just talking about 1500 devices.

bastyjuice 2 months ago

Hey Anton,

first of all, it’s really great that you’re replying personally. Your project is amazing, and you have my full respect.

The point that’s still unclear to me is about performance and workload. As I understand it, the main load should be on the endpoint that receives and processes the forwarded connections — not necessarily on the server that is acting as the forwarder.

So speaking purely theoretically: would a server with 4 GB RAM and 2 vCPUs be able to forward data from around 1,500 devices without any issues in 2s or 10s Interval.

That’s exactly what I’m trying to understand — whether the performance-critical part is the endpoint processing the data, or the listener that receives and forwards it.

Thanks again for your time!

Anton Tananaev 2 months ago

Typically the main bottleneck is the database. If you skip it and just forward data, then Traccar won't use much resources. Yes, 4GB RAM would be enough in that case.

bastyjuice 2 months ago

So for that case I can use H2 database with daily delete ? Or do your prefair mariadb

I saw that you removed the option for disable local history

Anton Tananaev 2 months ago

By no database I mean literally no database (database.memory config option).

bastyjuice 2 months ago

If done it like this in my compose file:

  TZ: "Europe/Berlin"
  CONFIG_USE_ENVIRONMENT_VARIABLES: "true"
  PROTOCOLS_ENABLE: "telic,teltonika,dualcam,bce,gt06,osmand,ruptela"
  PROTOCOL_TIMEOUT: "60"
  LOGGER_CONSOLE: "true"
  LOGGER_LEVEL: "info"
  DATABASE_MEMORY: "true"
  DATABASE_SAVEORIGINAL: "false"
  DATABASE_REGISTERUNKNOWN: "true"
  DATABASE_THROTTLEUNKNOWN: "false"
  FORWARD_ENABLE: "true"
  FORWARD_TYPE: "json"
  FORWARD_URL: "${FORWARD_URL}"
  FORWARD_HEADER: "Authorization: Bearer ${FORWARD_BEARER_TOKEN}"
  FORWARD_RETRY_ENABLE: "true"
  FORWARD_RETRY_DELAY: "1000"
  FORWARD_RETRY_COUNT: "3"
  FORWARD_RETRY_LIMIT: "100"
  EVENT_FORWARD_ENABLE: "true"
  EVENT_FORWARD_TYPE: "json"
  EVENT_FORWARD_URL: "${EVENT_FORWARD_URL}"
  EVENT_FORWARD_HEADER: "Authorization: Bearer ${FORWARD_BEARER_TOKEN}"
  FILTER_ENABLE: "true"
  FILTER_INVALID: "true"
  FILTER_ZERO: "false"
  FILTER_DUPLICATE: "true"
  FILTER_FUTURE: "86400"
  GEOCODER_ENABLE: "false"
  GEOLOCATION_ENABLE: "false"
  SPEEDLIMIT_ENABLE: "false"

but i only get

2026-04-30 17:17:40  WARN: Unknown device - 1XXXXXXXXXXX (X.X.X.1)
2026-04-30 17:17:40  INFO: [Tcbb7e41f: teltonika > X.X.X.X] 00
2026-04-30 17:17:40  INFO: [Tcbb7e41f] disconnected
2026-04-30 17:19:41  INFO: [T58969347] connected

so did i miss somthing =?

Anton Tananaev 2 months ago

You're missing DATABASE_REGISTER_UNKNOWN parameter.

bastyjuice 7 days ago

Thanks all is workling very well but i noticed after some times CPU Spikes and Log Spamming. I am on traccar/traccar:latest Docker Image

  traccar:
    image: traccar/traccar:latest
    container_name: traccar
    restart: unless-stopped

    environment:
      TZ: "Europe/Berlin"
      JAVA_TOOL_OPTIONS: "-Xms512m -Xmx4g -Djava.net.preferIPv4Stack=true"
      CONFIG_USE_ENVIRONMENT_VARIABLES: "true"

      PROTOCOLS_ENABLE: "teltonika,dualcam"
      PROTOCOL_TIMEOUT: "60"

      LOGGER_CONSOLE: "true"
      LOGGER_LEVEL: "warning"

      DATABASE_MEMORY: "true"
      DATABASE_SAVE_ORIGINAL: "false"
      DATABASE_REGISTER_UNKNOWN: "true"
      DATABASE_REGISTER_UNKNOWN_REGEX: "^[0-9]+$"

      FORWARD_ENABLE: "true"
      FORWARD_TYPE: "json"
      FORWARD_URL: "https://example.com/traccar.php"
      FORWARD_HEADER: "Authorization: Bearer YOUR_TOKEN_HERE"
      FORWARD_RETRY_ENABLE: "true"
      FORWARD_RETRY_DELAY: "1000"
      FORWARD_RETRY_COUNT: "3"
      FORWARD_RETRY_LIMIT: "100"

      EVENT_FORWARD_ENABLE: "true"
      EVENT_FORWARD_TYPE: "json"
      EVENT_FORWARD_URL: "https://example.com/traccar_events.php"
      EVENT_FORWARD_HEADER: "Authorization: Bearer YOUR_TOKEN_HERE"

      FILTER_ENABLE: "true"
      FILTER_INVALID: "true"
      FILTER_DUPLICATE: "true"
      FILTER_FUTURE: "86400"

      GEOCODER_ENABLE: "false"
      GEOLOCATION_ENABLE: "false"
      SPEEDLIMIT_ENABLE: "false"
2026-06-26 20:24:00  WARN: [T90a5f40a] error - ConcurrentModificationException (... < CacheManager:156 < ConnectionManager:174 < BaseProtocolDecoder:135 < TeltonikaProtocolDecoder:75 < ...)

2026-06-26 20:24:03  WARN: [Tfab12457] error - ConcurrentModificationException (... < Storage:64 < CacheManager:143 < ConnectionManager:174 < BaseProtocolDecoder:135 < ...)

2026-06-26 20:24:12  WARN: [T417808c2] error - Operation timed out - IOException (...)

Is There somethign i Miss ?

Anton Tananaev 7 days ago

You would have to investigate it more. Just pointing single liners from logs is not very useful. You should check resource usage, don't forget to check if you're actually on the latest version, try disabling some parameters, like forwarding, which is extremely common source of issues.