Forward URL data loosing.

dneb8 months ago

Hello, so i was trying to forward incoming data from GPS to third party client. but some how I've noticed a performance issue when forwarding lots of data per second, currently there are around 4k devices sending data to traccar and i can see all the data in the traccar DB, but not all of it makes it to the other end after being forwarded. what should i check for or is there better ways i can forward incoming data to another server?

Anton Tananaev8 months ago

How much data are devices sending?

dneb8 months ago

between 768 bytes and 1280 bytes depending on device types. but at the same time i tried looking at the log and it says Position forwarding failed: 512 pending - Connection refused:

Anton Tananaev8 months ago

Looks like your forwarding endpoint refused connection.

dneb8 months ago

is it possible to forward on multiple endpoints to check?

Anton Tananaev8 months ago

No.

dneb8 months ago

by the way endpoint is localhost Anton.

<entry key='forward.url'>http://localhost/traccar/forward.php</entry>
SwayDev8 months ago

Optimize your script and web server, and after a certain point you may want to consider load balancer and deploying multiple endpoint instances behind the load balancer.

B.Ihab7 months ago

Hi @SwayDev, the problem with Load balancer, is the internal cache, when the instance B receive data from the device, only the cache of the instance B are updated, all the other instance need to be refresh to get the new data from the DB, until there in the same Datacenter and under the same network and we're using the multicast.

SwayDev7 months ago

The author of this post was referring to their endpoint and the config shared shows it's a php script, so the load balancer suggestion I made was for their endpoint and not Traccar.