Communication error with large db reads

Siemir6 years ago

Hello,
I'm having problems with reading big amounts of data from traccar, for e.g. reading summary for one device for last 3 months ends up in blue popup saying "communication error" exactly after 30s, despite the fact that DB is still going through the query (which I can see directly in the DB console). It looks like some kind of timeout, but I'm unable to find anything related to this value. My another question is how exactly is Traccar accessing data from the database, because if I do the exact same query through the psql console I'm getting all the data in less than 10s utilizing one full core, but when Traccar is doing so, it's using between 12-20 cores for 30s then it goes quiet, but the DB is still working for another 100s.
My setup is Postgresql 9.6 with SSD backend, used mostly with our monitoring system so the performance should not be a problem, current DB size is around 8 GB and the amount of records in the 'positions' table is 16M.
If you could help me out here, I would be really grateful.

Anton Tananaev6 years ago

That's your browser timeout.

Siemir6 years ago

That's what I thought, but in hidden options for Firefox the lowest timeout is at 90s, if you can point me in a right direction/option in any browser I'm happy to try it again.

Anton Tananaev6 years ago

I don't use Firefox. Try Googling for a solution.

Siemir6 years ago

So am I, but it was the one I found that gives ability to quickly change timeout settings. You knew the answer to my question instantly, so I assume you know the problem already and you have fixed it in the past. That's why I asked you which browser should I use to not experience this error, because I already tried all of the most popular ones and every single one of them throws the exact same error after 30s. Which by the way I found really weird that every browser would set exact same and very low timeout for this specific kind of connection, that is why I assumed it's the configuration fault not the browser.

Anton Tananaev6 years ago

I know the problem, but I don't have a solution. I have heard from other users that it's possible to configure in Firefox, but I've never tried it myself.

Siemir6 years ago

Well, I guess it's time to read up API docs and create some scripts for what I want to get.
I tried most of the Firefox timeout settings and I still get this error, but if anyone knows what setting is responsible for that I'm really curious at this point, so feel free to update this thread.

nejck6 years ago

It could be web server timeout if you're using nginx/apache proxy... ?

Siemir6 years ago

Connecting directly without proxy was probably second thing I did, so it's not that.

Ronald3 years ago

Siemir Hi. Sorry to comment on an old thread. Did you manage to get this fixed? If so, how? I am stuck with the same issue for about a year now