total distance of all devices has changed to 0

Harshana Srimala year ago

Recently I noticed some issues in my server.

  1. info box doesn't load in most of devices
  2. total distance has changed to 0
  3. Device doesn't show correct position in the map.

could you help me to resolve this issue. I used version 6.2.(it worked better in last few months) I updated to v6.5 but the issue is still there.

Anton Tananaeva year ago

What troubleshooting have you done so far? Please provide details.

Harshana Srimala year ago

I see those devices send 0 coordinates to the server. device reboot doesn’t fixed the issue. I was able to fix 0 coordinates issue by sending server set command to the device. which indicates the problem is from the device end but my question is why devices turned into that kind of situation?

It’s not a single device. all the devices at once. also how the distance reset which calculates from the server side?

Anton Tananaeva year ago

There's no automatic reset, which means someone has done it on your server.

Harshana Srimala year ago

I can guarantee it’s automatically vanished. I just drove 5km and I was able to see the positions while I drive. but after few minutes the history has missed. I can’t see the history positions. I suspect Its a database issue. yesterday I restarted my mariadb as well but it doesn’t help. Im outside right now. I will filter positions table manually and update here.

is there any other troubleshooting guide? could you assist?

Anton Tananaeva year ago

There's nothing to troubleshoot in Traccar itself. We never remove data automatically, as I said.

Harshana Srimala year ago

I suspect there is an issue with the database. will see

Harshana Srimala year ago

After investigating further, it appears that the id column may be of type INT, which has a maximum limit of:

  • INT (signed): 2,147,483,647
  • INT (unsigned): 4,294,967,295

It seems that the current maximum id value in the tc_positions table has reached this limit.

what should I do? I was thinking to change the type to BIGINT. any other suggestion? I only keep 3 months records

Anton Tananaeva year ago

Change the type.

Harshana Srimala year ago

finally I was able to fix the issue by changing the data type. anyhow as total distance calculate bassed on the last records, it has started from 0. Is there any way to get them back? i guess we can get total distance from a past position record and calculate the current Total distance.

Anton Tananaeva year ago

You could do an SQL query to calculate it from the last known value, but it's pretty complicated.

Harshana Srimala year ago

I will try