total distance of all devices has changed to 0

Harshana Srimal2 months 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 Tananaev2 months ago

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

Harshana Srimal2 months 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 Tananaev2 months ago

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

Harshana Srimal2 months 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 Tananaev2 months ago

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

Harshana Srimal2 months ago

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

Harshana Srimal2 months 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 Tananaev2 months ago

Change the type.

Harshana Srimal2 months 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 Tananaev2 months ago

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

Harshana Srimal2 months ago

I will try