Periodic traccar error in mysqld.log

startover9097 years ago

I have a Traccar server (latest 3.17 version) under testing/development, not in production yet. It's hosted on CentOS 7.5, with OpenJDK 8 and MariaDB 10.3.7.

The server seems to be running fine, but periodically errors like this pop up in MySQL(MariaDB)'s error log:

2018-06-25 14:52:23 27 [Warning] Aborted connection 27 to db: 'traccar' user: 'traccar' host: '127.0.0.1' (Got timeout reading communication packets)

It seems to happen about a dozen times per hour, seemingly at similar time internvals but sometimes randomly as well.

Is this something I should worry about?

Thanks.

Anton Tananaev7 years ago

I wouldn't worry about it, unless you are losing some data.

startover9097 years ago

I have MySQL wait_timeout set at 120 and traccar's server.timeout set at 120. Are these logs simply caused by the closing of connections? The question is why aren't the connections closed by Traccar or Java "gracefully"? Are there any parameters that can fine tune these behaviors?

Additionally, I find it weird that these logs occur a few times hourly even when the Traccar server is under zero load (no device report and no web interface access). Does the Traccar server (or the Java wrapper) connect to the database on a schedule by themselves (scheduled maintenance tasks etc)?

Thanks.

Anton Tananaev7 years ago

Database connection is handled by HikariCP library. It should handle everything gracefully and I never had problems like this, so if you want to dig deeper and find out why it's happening, you are welcome. I don't have the answer because I don't recall ever seeing errors like your one.

startover9097 years ago

Thanks for the clarification. I will try to dig deeper.

One thing I just found out: it's not random intervals. These occurs occur exactly every 30 minutes like clockwork (when it occurs, several connections are logged at once).

Any idea you can think of, what kind of stuff happens every 30 minutes?

Thanks again.

Anton Tananaev7 years ago

I suspect it's some timeout on the database side, but it's just a guess.

startover9097 years ago

Removing all timeout setting in my.cnf (wait_timeout, interactive_timeout, and connect_timeout) stopped the errors.