HikariPool-1 Timeout

Philo-T3 years ago

I'm constantly getting an error:

2022-03-22 16:43:03  WARN: Update device status error - HikariPool-1 - Connection is not available, request timed out after 30010ms. - SQLTransientConnectionException (... < QueryBuilder:58 < *:130 < DataManager:322 < DeviceManager:313 < ...)

The error occurs when I log in with user A, then log out, and Log in with user B. Then, I try to log in with user A again, and the site simply doesn't log in and I get the timeout error above. My way to solve this, is Restarting the traccar service, and I can log back in.

It also occurs by just leaving the server running all day, and suddenly it times out when a device is trying to update it's location.

My server is local, and the database is in MySQL. I have 2 users and 4 devices.

Philo-T3 years ago

If you need more information let me know.

Macan3 years ago

By default connection timeout is 30 seconds , try to increase connection time out in your /etc/mysql/mysql.conf.d/mysqld.cnf

add this line
connect_timeout=100

Philo-T3 years ago

Thank you for your response, I have a windows server, so I went to "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" and added the line "connect_timeout=100". Is that the same?

ajswe2 years ago

I have the same issue, did you ever solve this?

Philo-T2 years ago

Hi ajswe, yes, actually, it's several things:
I'm running ubuntu, so on "/etc/mysql/mysql.conf.d" I edited the file and added:
connect_timeout = 100
and on my traccar.xml file:

    <entry key='config.default'>./conf/default.xml</entry>
    <entry key='server.timeout'>60</entry>
    <entry key='web.timeout'>600000</entry>
    <entry key='status.timeout'>60</entry>
    <entry key='gps103.timeout'>60</entry>

so the devices timeout properly, and disconnect from the server, closing the connection on time and getting ready to connect again. It sometimes fails, and I get a hikaripool timeout, and then I need to restart the service, it works but it's not perfect, maybe some fine tuning to the timeouts. Hope this helps.

islam bahaz2 years ago

hello
i have the same problem and I did not find the solution
please any one help me