Forward URL - is there a limit/performance tuning that can be done

Quade dennis 7 years ago

Hi All

I'm trying to hunt down an issue on missing forwarded data

I see the data in the traccar DB, but in the forwarded logs on the other multithreaded app, I'm missing a chunk of 13 mins
I've seen this happen a few times, but now need to figure out where its going wrong.

To help with investigation:

  1. Are there any logging for failed forwarding in traccar?
  2. Is there a limit on what can be forwarded? (i'm doing approx 30 per second)
  3. Can I turn on some logging to log all forwarded messages so I can compare with what I receive?

Or are there any general performance issues with post and get that I should consider (I know this wouldn't be a traccar issue)

Any help appreciated
Thanks for your time

Anton Tananaev 7 years ago

There might be a performance issue here, especially if URL points to a remote server or processing takes a while. We have discussed option for batching forwarding, but it's not implemented yet.

Quade dennis 7 years ago

Thanks Anton

The URL is local on 127.0.0.1, and I respond immediately after getting the forwarded message.

I can adjust my app that processes the forward URL data, and increase the max connections, but if traccar/the underlying technology also has this limitation, I doubt it would make much difference, if any.

Another solution maybe to save the messages into a Queue, such as Rabbit or Microsoft Message Queue.
This would simply dump messages into a queue instead of forwarding to a URL and waiting for a response.
It would bypass any limitations, and could scale past the 30 per second failures i've seen

Would this be something you would consider as an alternative?

Anton Tananaev 7 years ago

You can create a feature request for it, but I don't think it would be implemented any time soon.

Quade dennis 7 years ago

Thanks Anton

I can edit the code myself and create a pull request if it's something you think would be helpful

Which file should I look at where is actually does the forwarding?
I can figure the rest out from there.

Also, should I move this chat to github for any further stuff?

Anton Tananaev 7 years ago

WebDataHandler class. Yes, you can move this discussion to GitHub.

Julius Nhodo 10 months ago

Hi guys,

I am able to receive location updates from the gps device on my traccar server (I checked the traccar logs to know this), I have set the forward url on traccar.xml, now I am experiencing the following error: WARN: Position forwarding failed: 0 pending - HTTP code 401 - RuntimeException (PositionForwarderUrl:74 < *:67 < ...)

My forward.url does not need authorization currently I am not sure why I have this error?

Anton Tananaev 10 months ago

The error is coming from your URL.