You have to investigate the root cause of the delay first before we can have any optimization suggestions. If everything is set up correctly and you have enough resources on the server, there should be no delay beyond network latency, which is usually less than a second.
Thanks Anton ! I think its enough resources on the server for 250 devices. It shows cpu uses, ram uses less than 20-30%. Is there any other otpimatizion method on traccar setting or any other suggagtion. Please.
Again, you have to figure out what the root cause is first.
Ok, Thanks for your suggation. I reseach and find a thing , I am not sure its a cause or not . it about indexing on database.CREATE INDEX idx_position_time ON positions (servertime);
I need to apply index for postions table but I am conufuse what I use here servertime or fixtime.
<entry key='filter.distance'>0</entry>
<entry key='filter.duplicate'>false</entry>
Is these effect or not?
I think you're ignoring what I'm suggesting and just trying some random things. I don't think it's going to work like that.
@Bhanu From Nepal
For troubleshooting you can for instance use the test-commands.py script from https://github.com/traccar/traccar/tree/master/tools to send the position data to the server device protocol port.
Download test-commands.py script
Install python to use the script
open the script in python and set the server ip and port.
From your server logfile you can copy a complete package of position data
You could create a test device (use id similar to your existing devices) on your server for the protocol port and use that tracker id in the data that you are going to send with the script. Make sure you use the correct date and time while you send the data.
This way if you send the data from your computer to the server the device data will go directly over the internet so you root out your simcard gprs / network coverage as a possible cause.
Now with the script you can actually test how fast the server processes your device data. If it is quick then you know that the issues is not your server. And you can go from there. Let me know how it goes.
Thanks , Track-trace ! I will try to do as per your instruction.
I tried with test-commands.py , I tried to send data from script to the server using my own vechiles gps IMEI . In result i find these data appear on traccar log file but it not reflect anything on web app or mobile app. I send another lon lang data also it shows on log file but not reflect on traccar web interface.
I did another one thing i tired to connect the server from another python script and send data to the traccar server and get responce on log. but , here server is connected too much fast , data also send and i can see on log file but I cant get any responce from server to my console and also not reflect any thing on web interface.
I am new on this, Please guide me how to find out root cause.
Sorry for distrubing with these basic things and Thanks in advance !!!
Show what you send with the script
You could show the server log when you send the data from your computer to the server.
If you send correct position data it should be seen on the web app.
Ps.
Compare the data with what your device sends and show it here (from the server log).
Thanks for your kind support.
This is the data which I send :
s.send(b"867111063081688, time: 2025-02-06 11:00:55, lat: 27.7172, lon: 85.3240, course: 207.0")
and
This is log details :
2025-02-06 11:00:17 INFO: [Tb7f11bc1] connected
2025-02-06 11:00:17 INFO: [Tb7f11bc1: gt06 < 113.199.248.103] 867111063081688, time: 2025-02-06 11:00:55, lat: 27.7172, lon: 85.3240, course: 207.0
I got log data but not anything changes on vechile position.
What you're sending is not a valid GT06 format.
Thanks !
Is this correct way:
import socket
import binascii
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("103.90.86.173", 5023))
s.send(b"7878221225020611390002FA1BB009279E200000CF00000000000000000001XXXX0D0A")
while True:
print(s.recv(1024))
s.close()
Why dont you check and show here what your working device actually send s.
You should be able to see it in the log.
Ps. I do not use GT06 but what i send with the script is the decoded Hex (the readable position data).
This script definitely won't work because GT06 requires a login.
Hello ! I am using Traccar V 6.5 on windows VPS and SQL Server 2019 for database. I am using GT06 Chines Devices with M2M SIM. We get update on map with time delay like sometimes we get update from one position to another postion on 1 minute , some time it takes 1.5 min. and some times it update on 3-45 second too.
Our clients wants live location on live time is it possiable?
How we can manage maximum possiability for live?
How to optimize for this issue from the server setting side, VPS capacity , devices or any ohers side to imporve.
Currently I am using VPS with intel Xeon Gold 6230 cpu @ 2.10 GHZ (2 Processors) 8 GB ram , and we have 250 devices are connected on this VPS.
Need idea to improve it, suggation and help.