Devices Uploading Old Data Slowly – Possible Database Performance Issue?

Haider 5 days ago

Hello everyone,

I’m currently running Traccar version 6.7.1 with the 6.7.3 web interface on the following server:

DigitalOcean VPS

16 GB RAM

8 vCPUs

160 GB SSD

6 TB Bandwidth

Database: MySQL

I’m experiencing an issue where some devices start uploading old data very slowly, in chunks (e.g., 60 to 180 positions at a time). Even after resetting the device, the problem continues.

Interestingly:

When I move the same device to another Traccar server, it instantly starts reporting the latest location correctly.

But if I move it back to the original server, it resumes the slow upload of old backlog data.

It looks like the server is not processing or writing incoming positions to the database fast enough, which could be causing the delay.

Additional context:

Approx. 800 devices connected, with 300 actively reporting.

I suspect the issue may be database-related, perhaps due to a performance bottleneck.

Has anyone faced a similar issue?
Any suggestions on optimizing MySQL or Traccar configuration for better data ingestion speed would be highly appreciated.

Thanks in advance!

Anton Tananaev5 days ago

Is there any evidence that the database is the issue? What troubleshooting have you done so far?

Haider 5 days ago

Hi Anton,

Thanks for the quick response.

I don’t have concrete evidence yet that the database is the issue, but based on what I’ve observed, I suspect it might be related. Here’s why:

When the same device is moved to another Traccar server (with a similar setup), it immediately starts sending the latest positions normally.

When it’s moved back to the original server, it resumes uploading old data slowly, in chunks.

This behavior persists even after resetting or rebooting the device.

Given that, I’m leaning toward the possibility that the database (MySQL) or Traccar’s queue processing might be a bottleneck on this specific server.

So far, I’ve checked:

System resources (CPU, RAM, disk I/O) – they appear under normal usage.

MySQL logs – no obvious errors or slow queries identified yet.

Traccar logs – I see continuous data being processed, but not sure if there’s queue congestion.

I’d appreciate your thoughts on whether it could be a database write issue or perhaps a queue buildup on the server. Also, if there are specific MySQL or Traccar optimizations you'd recommend for this scale (800 devices / 300 active), that would be great to know.

Thanks again!

Anton Tananaev4 days ago
  • Are you using a local database?
  • Are you using an SSD drive for the database?
  • How many locations per second are writing?
  • Does server restart help, at least temporarily?
  • Are you doing any regular queries to the database, like reports?
Haider 4 days ago

I'm using a DigitalOcean VPS, and the database is running on an SSD.

Yes, it's hosted locally on the VPS.

Yes, the VPS uses SSD storage.

Not exactly sure — I don't have precise metrics on the write rate.

No, restarting the server doesn't seem to make a difference.

No scheduled reports, but it's possible the client occasionally fetches a report for a single vehicle.

Anton Tananaev4 days ago

If restart doesn't help, even temporarily, I suspect it's not a server issue.

You should figure out your how many locations per second you're getting. That's one of the most important things to understand if your server can handle it.

Hamza3 days ago

Approximately 400 positions per minute.

Anton Tananaev3 days ago

That's pretty high, but should be fine with your specs.

Haider 3 days ago

If everything seems fine, what do you think could be causing the issue?

Anton Tananaev3 days ago

Don't have any ideas.

Hamza3 days ago

https://youtu.be/eXSCI7JCx1Q

Please watch this video. When I connect the devices to another server, they start sending locations immediately, but on my main server, they get stuck and start uploading with a delay after a few hours or minutes. This happens with almost 70% of the vehicles. I did not find anything in the logs and did not see any SQL errors.