Digital Ocean 503 Errors

NorthernChap2 years ago

Hi all,

I have an issue with my Traccar install and it's driving me mad! It's running on a standard Digital Ocean $5 special, and currently has one user and one device so it isn't heavily loaded. There are no other applications running on the server, it's just for Traccar.

Several times a day it gives a 503 error but then recovers. Eventually it stops entirely, and the logs show:

2022-03-30 06:45:03  INFO: [80570919] id: 9172020754, time: 2022-03-30 06:44:50, lat: 53.77690, lon: -1.80013, course: 0.0
2022-03-30 06:45:38  INFO: [80570919: h02 < 82.132.186.161] HEX: 2a48512c393137323032303735342c56312c3035343532302c412c353334362e363133352c4e2c30303134382e303037372c572c3030302e30302c3030302c33303033323>
2022-03-30 06:50:57  INFO: HikariPool-1 - Starting...
2022-03-30 06:50:59  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2022-03-30 06:51:01  INFO: HikariPool-1 - Start completed.
2022-03-30 06:51:01  INFO: Clearing database change log checksums
2022-03-30 06:51:03  INFO: Successfully acquired change log lock
2022-03-30 06:51:04  INFO: Successfully released change log lock
2022-03-30 06:51:04  INFO: Successfully acquired change log lock
2022-03-30 06:51:04  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-03-30 06:51:04  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-03-30 06:54:54  INFO: Successfully released change log lock
2022-03-30 06:54:54 ERROR: Could not release lock - Communications link failure during rollback(). Transaction resolution unknown. - SQLNonTransientConnectionException (... < DataManager:293 < *:86 < Co>
2022-03-30 06:54:54 ERROR: Main method error - Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. - EOFException (... < DataManager:293 < >
2022-03-30 06:55:06  INFO: HikariPool-1 - Starting...
2022-03-30 06:55:07  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2022-03-30 06:55:08  INFO: HikariPool-1 - Start completed.
2022-03-30 06:55:08  INFO: Clearing database change log checksums
2022-03-30 06:55:09  INFO: Waiting for changelog lock....
2022-03-30 06:55:19  INFO: Waiting for changelog lock....
2022-03-30 06:55:29  INFO: Waiting for changelog lock....

Then it will stay like this until I log into MySQL and truncate the table 'DATABASECHANGELOGLOCK' - then it will work for some time before the same happens again.

There must be other people running at Digital Ocean or on small servers - anyone seen this or know how I can resolve it? There is a setting for 'watchdogsec' I saw on other threads - I've tried 300 and 600 but no difference.

Thanks!

Ronaldo2 years ago

from the little I understand seeing the logs, I believe you are using the old version driver mysql

Anton Tananaev2 years ago

It's not an issue with the driver, but there's some issues with your database.

On the second restart it also got locked, so you need to unlock it to proceed.

NorthernChap2 years ago

Hi, thanks for the reply - yes, I know it got locked in these logs, also I know how to unlock it so it's working again - but the question is, WHY does it do this? It happens often (like every day or two days) and it can't be that it happens to everybody using a small server...? There must be something I can do - change some settings somewhere, etc. to stop it doing this DB lock? I guess something else fails first, then the DB is locked when it tries to restart?

Anton Tananaev2 years ago

Yes, something fails first and then after restart you get a lock:

Could not release lock - Communications link failure during rollback(). Transaction resolution unknown.

This basically says that there was some issue with database connection. Possibly your MySQL instance died. You really need to look into various logs to see what happened.