TCP connections not getting closed

Niraj Singha year ago

We have less than 1200 devices in 5023 port, but sometimes the number of connections increases to 12K. While this happens the performance degrades drastically.

We investigated the numbers of open connections and found that connections to traccar are hanging in CLOSE_WAIT state. Is there a resource leak? we have set the server.timeout to 300, and gt06.timeout to 300. We have done every thing given in traccar optimisation page. We have increased java heap size limit to 4G, and starting heap size to 2 G. there is sufficient ram.

The TIME_WAIT connection count is low. So it appears that the devices are terminating the socket properly on their side, the issue seems to be on the server side

I am attaching screenshot of our connections status.

https://we.tl/t-BKNdnvzmsU

Anton Tananaeva year ago

I don't understand your explanation. You have 1200 devices then why do you have 12k connections if devices are terminating connections properly. This doesn't really add up. Where are the connections coming from?

Niraj Singha year ago

please check our attached screenshots.You will understand what I am trying to say.

Niraj Singha year ago

our issue is that number of open connections are increasing suddenly even after setting our timeout.it is our config for timeout.

<entry key = 'server.timeout'>600</entry>
<entry key = 'gt06.timeout'>600</entry>
Anton Tananaeva year ago

And you're using the latest official release without any customization or config changes (other than what you already mentioned)?

Niraj Singha year ago

I am using 5.4 version without any customization.

Anton Tananaeva year ago

OK. Then I would recommend upgrading first.

Niraj Singha year ago

I found out that we have done some changes at api level so upgrade may not be possible at this time.What else should i check because we have two servers and both are having same kind of issues.

number of connections get increase and position update stops working after that.We have to restart traccar then it will work from sometime and then again same situation.

Anton Tananaeva year ago

So you're not using the official version? Then I don't think I can help you here.