Error current heartbeatlag (9223372036.85s) is too high
Hi all, I want to ask about gh-ost migration.
When I run gh-ost migration on my virtual machine and the progress reached 100%, it got error log current heartbeatlag 9223372036.85s is too high, it needs to be less than both --max-lag-millis (1.50s) and --cut-over-lock-timeout-seconds (3.00) to continue.
Here is the current specification:
- gh-ost version is 1.1.6
- using MariaDB version 11.4
What I have done are:
- Upgrading the gh-ost version from 1.1.5 into 1.1.6
- Running the gh-ost command without
--max-lag-millis - Reseting the master database to refresh the replica
- Run
ANALYZE TABLEto refresh the performance schema - Also I have set the timezone setting into UTC+7 to comply with my current timezone in Indonesia by running this SQL:
SET GLOBAL time_zone = '+07:00';andSET time_zone = '+07:00';
So I'm curious about the printed value of TimeSinceLastHeartbeatOnChangelog(), I decide to debug it on my local by print its value, but it shows 0001-01-01 00:00:00 +0000 UTC, hence the heartbeat lag value become extremely huge.
Do you have any idea why this happens? Will appreciate any help given for this issue. Thanks in advance!
Attachments:
Ensure performance_schema is enabled and set --heartbeat-interval 1s in your gh-ost command to fix the heartbeat lag issue.
- Ensure performance_schema is configured correctly:
SET GLOBAL performance_schema = ON;
- Add the --heartbeat-interval option in your gh-ost command:
--heartbeat-interval 1s
@ritxman Were you able to resolve this issue? I am also stuck at the same issue
DEBUG current HeartbeatLag (9223372036.85s) is too high, it needs to be less than both --max-lag-millis (1.50s) and --cut-over-lock-timeout-seconds (3.00s) to continue
If anyone else still running into this, try enabling binlog_legacy_event_pos.
Debug showed that Migrator's onChangelogEvent() never fires for 'heartbeat' binlog dml event. Looking at v11.4 binlog, it shows that end_log_pos is always set to 0 by default. Presuming something in the app or its libs is ignoring these events based on that.
Not sure if this was fixed in gh-ost v1.1.7 or if planned to be fixed, because its a MariaDB issue. :(((