Traccar Server Throttling Issue with OSMAND Protocol

adriantona4 months ago

Hello fellow forum members,

I hope you’re all having a great day! I’m reaching out because I’ve encountered an interesting challenge with my Traccar server, and I’m hoping someone here might have some insights.

Background:

I’m running a server called HMDM, which is specifically designed for managing mobile devices (in this case, Android devices).
The server collects device location data approximately every 10 seconds.

Integration with Traccar:
Recently, I’ve successfully set up communication between my HMDM server and my Traccar server using the OSMAND protocol.
Everything seemed to be working smoothly—until I noticed a peculiar behavior.

The Issue:
After processing several location updates in quick succession, it appears that the Traccar server’s response time slows down significantly for requests coming from my HMDM server.
Specifically, it seems to throttle the processing speed to around two requests every 5 seconds for this specific IP address.

Troubleshooting So Far:
I’ve diligently checked the Traccar logs, but there’s no indication of throttling or any related messages.

My Questions:
Does Traccar indeed have any built-in throttling mechanisms for the OSMAND protocol?
If it does, how can I adjust or increase this limit?
Alternatively, is there a way to whitelist the IP address of my HMDM server to bypass any potential throttling?
I greatly appreciate any insights or suggestions you might have. Let’s unravel this mystery together!

Thank you in advance, and happy tracking!

Best regards,

Anton Tananaev4 months ago

Do you have logs?

adriantona4 months ago

Sorry there is it:

Traccar log acepting various positions por second:

2024-07-19 16:40:15 INFO: [Tf82fb561: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:16 INFO: [T66ff8353: osmand < 3.137.40.132] 474554202f3f69643d3335363536343831313374696d657374616d703d3137323133373835343620485454502f312e310d0a486f73743a206770732e7567692e6d783a3530202a2f2a0d0a0d0a
2024-07-19 16:40:16 INFO: [T66ff8353: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:16 INFO: [T4ed0fe47: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332e3039323639352674696d657374616d703d3137323133373835393820485454502f312e310d0a486f73743a206770732e750a4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:16 INFO: [T4ed0fe47: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:17 INFO: [T1c381f91: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332674696d657374616d703d3137323133373836313720485454502f312e310d0a486f73743a206770732e7567692e6d783a353a202a2f2a0d0a0d0a
2024-07-19 16:40:17 INFO: [T1c381f91: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:17 INFO: [T608726c6: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332e30393234343530303030303030312674696d657374616d703d3137323133373836363420485454502f312e310d0a486f732f372e36382e300d0a4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:17 INFO: [T608726c6: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:18 INFO: [Te7395b2e: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332674696d657374616d703d3137323133373836393920485454502f312e310d0a486f73743a206770732e7567692e6d783a353a202a2f2a0d0a0d0a
2024-07-19 16:40:18 INFO: [Te7395b2e: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:19 INFO: [Te3d250cb: osmand < 3.137.40.132] 474554202f3f69643d383632393735303530372e30383934393235352674696d657374616d703d3137323133373837303920485454502f312e310d0a486f73743a20677073300d0a4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:19 INFO: [Te3d250cb: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:19 INFO: [T0c55562a: osmand < 3.137.40.132] 474554202f3f69643d3335363536343831313374696d657374616d703d3137323133373737323520485454502f312e310d0a486f73743a206770732e7567692e6d783a3530202a2f2a0d0a0d0a
2024-07-19 16:40:19 INFO: [T0c55562a: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:21 INFO: [T739c012c: osmand < 3.137.40.132] 474554202f3f69643d3335363536343831313374696d657374616d703d3137323133373737383520485454502f312e310d0a486f73743a206770732e7567692e6d783a3530202a2f2a0d0a0d0a
2024-07-19 16:40:21 INFO: [T739c012c: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:22 INFO: [Tf2f3c1ef: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332e30393233343136363636363636362674696d657374616d703d3137323133373737393220485454502f312e310d0a486f732f372e36382e300d0a4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:22 INFO: [Tf2f3c1ef: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:22 INFO: [T380f3171: osmand < 3.137.40.132] 474554202f3f69643d3335363536343831313374696d657374616d703d3137323133373738343520485454502f312e310d0a486f73743a206770732e7567692e6d783a3530202a2f2a0d0a0d0a
2024-07-19 16:40:22 INFO: [T380f3171: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f

Same log but only two positions per every five seconds:

2024-07-19 16:40:29 INFO: [T89bbd20a: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332e30393235373636363636363636362674696d657374616d703d3137323133373738363220485454502f312e310d0a486f732f372e36382e300d0a4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:29 INFO: [T89bbd20a: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:35 INFO: [T4e07ff63: osmand < 3.137.40.132] 474554202f3f69643d3335363536343831313374696d657374616d703d3137323133373739303620485454502f312e310d0a486f73743a206770732e7567692e6d783a3530202a2f2a0d0a0d0a
2024-07-19 16:40:35 INFO: [T4e07ff63: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:40 INFO: [Tb9dde381: osmand < 3.137.40.132] 474554202f3f69643d3335363536343831313336363636372674696d657374616d703d3137323133373739333220485454502f312e310d0a486f73743a206770732e75676963636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:40 INFO: [Tb9dde381: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:47 INFO: [T70ad5034: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332674696d657374616d703d3137323133373739363720485454502f312e310d0a486f73743a206770732e7567692e6d783a353a202a2f2a0d0a0d0a
2024-07-19 16:40:47 INFO: [T70ad5034: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:52 INFO: [Tde7310d5: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332e30393239393030303030303030312674696d657374616d703d3137323133373739393920485454502f312e310d0a486f732f372e36382e300d0a4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:40:52 INFO: [Tde7310d5: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:40:59 INFO: [T58bc79a1: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332674696d657374616d703d3137323133373830333720485454502f312e310d0a486f73743a206770732e7567692e6d783a353a202a2f2a0d0a0d0a
2024-07-19 16:40:59 INFO: [T58bc79a1: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:41:05 INFO: [Tbed90474: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131336d657374616d703d3137323133373830363220485454502f312e310d0a486f73743a206770732e7567692e6d783a353035352f2a0d0a0d0a
2024-07-19 16:41:05 INFO: [Tbed90474: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:41:16 INFO: [T601d4696: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131332674696d657374616d703d3137323133373830393920485454502f312e310d0a486f73743a206770732e7567692e6d783a353a202a2f2a0d0a0d0a
2024-07-19 16:41:16 INFO: [T601d4696: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f
2024-07-19 16:41:21 INFO: [Ta8e8f0c4: osmand < 3.137.40.132] 474554202f3f69643d333536353634383131331743d31382e383430353638333333333333333334266c6f6e3d2d39372e3039323633352674696d657374616d703d3137323485454502f312e310d0a486f73743a206770732e7567692e6d783a353035350d0a557365722d4167656e743a206375726c2fa4163636570743a202a2f2a0d0a0d0a
2024-07-19 16:41:21 INFO: [Ta8e8f0c4: osmand > 3.137.40.132] 485454502f312e3120323030204f4b0d0a636f56e6774683a20300d0a0d0a
Anton Tananaev4 months ago

I see that Traccar response is instant, which already contradicts what you said earlier about delayed responses.

adriantona4 months ago

Thank you very much for your prompt reply,

I apologize—it was my mistake. As I’m still learning, I should have recognized that the ‘osmand >’ string in the log was indeed the answer.

I’ll investigate further on my server’s side.

Once again, thank you for taking the time to review my post, and congratulations on such a wonderful project!"

JCardus4 months ago

I'm also having an issue with osmand on the latest master.

I'm timing out at 5 seconds on the client side, but I don't see any response on the server log. I have geocoding disabled.

here's my log:

2024-08-02 11:02:50  INFO: [Ta1f3bea2: huabao > 187.60.53.254] 7e8001000541305671600300000968020000d27e
2024-08-02 11:03:14  INFO: [Ta1f3bea2: huabao < 187.60.53.254] 7e020000254130567160030969000001002000002f0143c97502d9b0ec001800000000240802110313010400000e3930011f2e7e
2024-08-02 11:03:15  INFO: [Ta1f3bea2] id: 413056716003, time: 2024-08-02 11:03:13, lat: -21.21970, lon: -47.82104, course: 0.0
2024-08-02 11:03:15  INFO: [Ta1f3bea2: huabao > 187.60.53.254] 7e8001000541305671600300000969020000d37e
2024-08-02 11:03:19  INFO: [T39a179f6] connected
2024-08-02 11:03:19  INFO: [T39a179f6: osmand < 54.86.176.162] GET /?id=866430023815782&lat=-33.52787780761719&lon=-70.69085693359375&heading=118&speed=15.010798724114766&ignition=true×tamp=1722596543000 HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: axios/0.27.2\r\nHost: gps.rastreosat.com.br:5055\r\nConnection: close\r\n\r\n
2024-08-02 11:03:24  INFO: [T39a179f6] disconnected
2024-08-02 11:03:38  INFO: [Ta1f3bea2: huabao < 187.60.53.254] 7e02000025413056716003096a000001002000002f0143c97502d9b0ec001800000000240802110338010400000e3930011f067e
2024-08-02 11:03:40  INFO: [Ta1f3bea2] id: 413056716003, time: 2024-08-02 11:03:38, lat: -21.21970, lon: -47.82104, course: 0.0
2024-08-02 11:03:40  INFO: [Ta1f3bea2: huabao > 187.60.53.254] 7e800100054130567160030000096a020000d07e
2024-08-02 11:04:04  INFO: [Ta1f3bea2: huabao < 187.60.53.254] 7e02000025413056716003096b000001002000002f0143c97502d9b0ec001800000000240802110403010400000e3930011f3b7e
2024-08-02 11:04:05  INFO: [Ta1f3bea2] id: 413056716003, time: 2024-08-02 11:04:03, lat: -21.21970, lon: -47.82104, course: 0.0
2024-08-02 11:04:05  INFO: [Ta1f3bea2: huabao > 187.60.53.254] 7e800100054130567160030000096b020000d17e
Anton Tananaev4 months ago

Are you sure you don't have any external services that could cause delays, like reverse geocoding?

JCardus4 months ago
Anton Tananaev4 months ago

And you're sure you provided the complete log without filtering anything?

JCardus4 months ago

Yes I'm sure, I didn't filter anything.

Anton Tananaev4 months ago

You can try server.instantAcknowledgement and see if it helps.

JCardus4 months ago

WIth that I get the response, but the device doesn't update.

Anton Tananaev4 months ago

And you're using the latest official release without any code modifications?

JCardus4 months ago

Yes, 6.3.

Anton Tananaev4 months ago

Don't have any other ideas. You would have to debug it.