Two Decades of Linux Expertise 400-9696-513 24/7 technical support

Troubleshooting

Real Linux failure cases from front-line operations — symptoms, root-cause analysis and the fixes applied, for you to consult and self-check.

CriticalDatabase

Website/Application Database Connection Fails After Upgrading to MySQL 8.4 (Authentication Plugin Incompatibility)

Symptom

After upgrading a production database from 8.0 to 8.4 LTS, older clients such as PHP websites and Navicat report database connection errors and the site goes down. Logs commonly show "Authentication plugin 'caching_sha2_password' cannot be loaded" or "Plugin 'mysql_native_password' is not loaded" (ERROR 1524).

View cause and solution
Root cause

MySQL 8.4 disables the mysql_native_password plugin by default in favour of caching_sha2_password, so existing accounts still using the old plugin stop working immediately after the upgrade. The mysqlnd driver in PHP 7.4 does not support caching_sha2_password and therefore always fails to connect. In addition, passwords containing characters such as ! trigger Bash history expansion when running SQL and produce an "event not found" error.

Solution

1) Before upgrading (mandatory): check every account with SELECT user,host,plugin FROM mysql.user; and migrate accounts that must stay compatible with older clients in advance: ALTER USER 'dbuser'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password'; (if the password contains !, run set +H to disable history expansion, or execute the SQL through a heredoc).
2) For legacy applications such as PHP 7.4: the account must be created explicitly with IDENTIFIED WITH mysql_native_password BY 'password'; (this plugin is disabled by default in MySQL 8.4; it can be re-enabled by setting mysql_native_password=ON and restarting, but upgrading the client is preferable to depending on it long term).
3) After the upgrade: test with real clients and confirm that every consumer (website, scripts, BI) works before opening traffic to the public.

Applies to: MySQL 8.0 to 8.4 LTS0 views
MajorDatabase

MySQL 8.4 Fails to Start: Deprecated or Removed Parameters in the Configuration File

Symptom

After upgrading to 8.4 or restarting, mysqld will not start. The error log reports "unknown variable", "Variable is deprecated" or "Server startup failed".

View cause and solution
Root cause

Version 8.4 removed several legacy parameters (typically expire_logs_days, replaced by binlog_expire_logs_seconds) as well as a number of deprecated system variables. When upgrading from 8.0, leftover settings in an old my.cnf are not cleaned up and cause startup to fail.

Solution

1) Pre-upgrade check: validate the configuration with the target version's binary using mysqld --validate-config --defaults-file=/etc/my.cnf to catch invalid parameters early.
2) Clean up my.cnf against the list of parameters removed in 8.4; for example replace expire_logs_days = 10 with binlog_expire_logs_seconds = 864000.
3) Before upgrading, run SELECT user,host,plugin FROM mysql.user; to verify account plugins and review sql_mode differences, so the configuration matches the target version before going live.

Applies to: MySQL 8.4 LTS1 views
CriticalDatabase

ERROR 1040 Too many connections: Connection Limit Reached, New Connections Rejected

Symptom

Applications report "Too many connections" in large numbers, new connections cannot be established, and websites/APIs return widespread 5xx errors. SHOW STATUS LIKE 'Threads_connected' is close to max_connections (default 151).

View cause and solution
Root cause

A traffic spike exceeds the limit; the application leaks connections (never closing them after use) or the connection pool is badly sized; slow queries hold connections for a long time, so connections pile up.

Solution

1) Emergency recovery (no restart needed): log in with an account holding CONNECTION_ADMIN/SUPER, run SHOW PROCESSLIST; and KILL ; on idle Sleep connections with a large Time value to free slots; or in bulk: SELECT CONCAT('KILL ',id,';') FROM information_schema.processlist WHERE command='Sleep' AND time>60;
2) Raise the limit: SET GLOBAL max_connections = 500; dynamically (or write it to my.cnf and restart), but size it against available memory rather than blindly doubling it.
3) Fix the root cause: repair connection leaks, size the pool properly, enable slow_query_log with log rotation and optimise slow queries; introduce a thread pool if necessary.

Applies to: MySQL 5.7 / 8.0 / 8.40 views
MajorDatabase

Client Reports caching_sha2_password Cannot Be Loaded / ERROR 2061 Requires a Secure Connection

Symptom

Older Navicat versions, legacy PHP drivers (mysqlnd without support), and the Node.js mysql package fail with "Authentication plugin 'caching_sha2_password' cannot be loaded" (ERROR 2059) or "Authentication requires secure connection" (ERROR 2061). On RDS, accounts created after upgrading from 8.0 to 8.4 cannot connect.

View cause and solution
Root cause

Since MySQL 8.0 the default authentication plugin is caching_sha2_password, which older clients do not support. ERROR 2061 usually occurs when the client does not use TLS and the server's authentication cache is empty (the first login after a restart, failover or flush requires TLS or the server RSA public key). On RDS 8.4 new accounts use caching_sha2_password by default.

Solution

1) Upgrade the client/driver: move PHP to a version supporting caching_sha2, or switch to a compatible driver such as mysql2 for Node; upgrade Navicat to a recent release.
2) Temporary compatibility: for a specific account run ALTER USER 'app'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; on self-managed MySQL 8.4 the old plugin can be enabled with mysql_native_password=ON plus a restart (not recommended long term).
3) For ERROR 2061: enable TLS in the driver (recommended), or allow retrieval of the server public key (for example mysql --get-server-public-key or the equivalent driver option). On RDS use a custom parameter group to set authentication_policy.

Applies to: MySQL 8.0 / 8.4 (including Alibaba Cloud RDS and Amazon RDS)0 views
MajorDatabase

MySQL Memory Usage Keeps Climbing and Only Drops After a Restart (Suspected Memory Leak)

Symptom

Monitoring shows mysqld RES growing steadily past 80% and never falling back, with free memory exhausted. This is often misdiagnosed as a memory leak.

View cause and solution
Root cause

On Linux, when mysqld is the largest memory consumer, glibc malloc usually does not return freed memory to the OS; it keeps it inside the process for reuse on the next allocation. This is an optimisation of malloc, not a real leak (upstream verified no leak with valgrind/ASAN). An oversized innodb_buffer_pool_size and a high connection count also push resident memory up.

Solution

1) First confirm whether there really is a leak using valgrind / ASAN or a sysbench stress test; in most cases this is malloc behaviour rather than a leak.
2) Size innodb_buffer_pool_size sensibly (typically 50%-70% of physical RAM) and avoid setting it too large; lowering it dynamically and then restoring it can free some memory temporarily (note it causes a brief slowdown).
3) Cap max_connections and per-connection buffers (sort/join/read buffer) to reduce resident overhead; assess real memory needs and consider scaling up.

Applies to: MySQL 8.x on Linux0 views
MajorDatabase

InnoDB Lock Wait Timeout (ERROR 1205) and Deadlocks (ERROR 1213)

Symptom

Applications report "Lock wait timeout exceeded; try restarting transaction" (ERROR 1205) or "Deadlock found when trying to get lock; try restarting transaction" (ERROR 1213); concurrent writes touching the same rows fail intermittently and transactions are rolled back.

View cause and solution
Root cause

Concurrent transactions lock the same rows or index ranges in different orders; long-running transactions are not committed promptly and hold locks too long; bulk UPDATE/DELETE statements lock too many rows at once and trigger lock wait timeouts; and the application does not roll back or release the connection immediately after catching an exception.

Solution

1) Short-term relief: SET GLOBAL innodb_lock_wait_timeout = 50; (50 seconds is already the default; increasing it is only a temporary measure), and identify the lock holder with SELECT * FROM information_schema.innodb_trx;
2) Permanent fix: shorten transactions, avoid remote calls inside a transaction, have all transactions access tables/rows in a consistent ascending primary-key order to reduce deadlocks, and COMMIT/ROLLBACK promptly.
3) Diagnose deadlocks: set innodb_print_all_deadlocks = ON in my.cnf so details are written to the error log; split bulk operations into small batches (for example 1,000 rows each).

Applies to: MySQL 5.7 / 8.0 / 8.4 (InnoDB)0 views
CriticalDatabase

MySQL/MariaDB service fails to start

Symptom

systemctl start mysqld fails, the error log shows "InnoDB: Unable to lock ./ibdata1" or "Tablespace is missing", and business reads and writes stop.

View cause and solution
Root cause

InnoDB tablespace damage after a power loss, wrong permissions on the data directory, a full disk, unsuitable my.cnf parameters (such as innodb_buffer_pool_size exceeding physical memory), or leftover crash-recovery lock files.

Solution

1) Read the exact error with tail -n 100 /var/log/mysqld.log; 2) check disk space and the owner of /var/lib/mysql (mysql:mysql); 3) for tablespace damage, back up the datadir first, then try starting with innodb_force_recovery=1~6 and export the data; 4) review and correct my.cnf after recovery; 5) set up master-slave replication and regular backups.

Applies to: RHEL/CentOS/MySQL 5.7/8.00 views
CriticalDatabase

PostgreSQL Transaction ID Wraparound Puts the Database into Read-Only Safety Mode

Symptom

The database reports "database is not accepting commands to avoid wraparound of transaction ID", switches to read-only mode automatically and rejects all writes.

View cause and solution
Root cause

The database age, age(datfrozenxid), is approaching the 2-billion limit and autovacuum has not run VACUUM FREEZE on old data in time. Once the threshold is reached, PostgreSQL deliberately enters a read-only protective state.

Solution

1) Check with SELECT datname, age(datfrozenxid) FROM pg_database ORDER BY 2 DESC; 2) urgently run VACUUM FREEZE on the oldest databases (this can take a long time on large databases, so do it off-peak); 3) raise autovacuum_freeze_max_age and tune autovacuum frequency so automatic cleanup keeps up; 4) set up monitoring and alerts to catch age growth early.

Applies to: PostgreSQL 16 / 15 / 141 views
MajorDatabase

PostgreSQL Lock Wait Timeouts and Deadlocks (deadlock detected)

Symptom

Sessions hang for a long time and report "deadlock detected", or queries are cancelled after a lock wait timeout; applications stall or transactions roll back.

View cause and solution
Root cause

Multiple transactions update the same rows or tables concurrently and take locks in inconsistent orders, producing a deadlock; or a long-running transaction holds locks and blocks subsequent ones (wait_event_type=Lock).

Solution

1) Find the blocker with SELECT * FROM pg_locks bl JOIN pg_stat_activity ... or pg_blocking_pids(pid); 2) cancel or terminate it with pg_cancel_backend(pid) / pg_terminate_backend(pid); 3) in the application, use a consistent lock order, shorten transactions and avoid long-running ones; 4) optimise slow queries with EXPLAIN to reduce lock hold time.

Applies to: PostgreSQL 16 / 15 / 140 views
CriticalDatabase

An Invalid PostgreSQL Replication Slot Causes WAL Build-Up and Fills the Disk

Symptom

Disk usage climbs to 100%, the database becomes read-only or refuses writes, and the pg_wal directory keeps growing without being recycled.

View cause and solution
Root cause

An inactive replication slot exists (for example a standby was decommissioned but its slot was never dropped). A slot prevents WAL recycling, so the checkpointer cannot remove old WAL files and the disk eventually fills up. PostgreSQL stops accepting writes once the disk is full.

Solution

1) Check with SELECT slot_name, active, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) FROM pg_replication_slots; 2) once you are sure the standby is no longer needed, run SELECT pg_drop_replication_slot('slot_name'); 3) writes resume after space is freed; 4) monitor the active status of replication slots and always drop slots when a standby is retired. Never manually rm files under pg_wal.

Applies to: PostgreSQL 16 / 15 / 140 views
CriticalDatabase

PostgreSQL Connection Limit Reached: FATAL: sorry, too many clients already

Symptom

New connections are rejected with "too many clients" or "remaining connection slots are reserved", and the application becomes largely unavailable.

View cause and solution
Root cause

max_connections is set too low for the concurrency level, or the application leaks connections (never releasing them), or a large number of idle connections (state=idle) pile up.

Solution

1) Emergency release of idle connections: SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE state='idle' AND ...; 2) raise max_connections (each connection consumes memory, so size it against available RAM); 3) long term, deploy a connection pooler such as PgBouncer in transaction mode and point the application at it; 4) fix connection leaks on the application side and shorten idle timeouts.

Applies to: PostgreSQL 16 / 15 / 140 views
CriticalDatabase

PostgreSQL Connection Failure: pg_hba.conf Authentication Mismatch or Restricted Listen Address

Symptom

Applications or clients cannot connect, reporting FATAL: no pg_hba.conf entry for host, password authentication failed, or could not connect to server: Connection refused; neither local nor remote connections work.

View cause and solution
Root cause

Common reasons: (1) listen_addresses in postgresql.conf is still localhost instead of *; (2) the METHOD in pg_hba.conf does not match the client (for example the server uses scram-sha-256 while an old client only supports md5); (3) wrong host, port, username or password; (4) the firewall does not allow port 5432.

Solution

1) Set listen_addresses=* in postgresql.conf; 2) add the matching entry to pg_hba.conf (for example host all all 0.0.0.0/0 scram-sha-256), then run SELECT pg_reload_conf() or systemctl reload postgresql; 3) log in with sudo -u postgres psql and run ALTER USER username WITH PASSWORD 'new_password', and align password_encryption with the client; 4) verify listening and network reachability with ss -tlnp | grep 5432 and telnet host 5432; on cloud platforms also check the security group.

Applies to: PostgreSQL 16 / 15 / 140 views
CriticalDatabase

GaussDB Database Node Failure: Read-Only System Disk / Node Down

Symptom

A single database node cannot be logged into or started and the database cannot run normally; alternatively the node's system disk becomes read-only, affecting reads and writes.

View cause and solution
Root cause

An OS-level fault on one node (such as a read-only system disk), a hardware failure, or a hung process. A batch of nodes can also fail together due to a shared hardware fault.

Solution

1) Rebuild the failed VM from the same image with the same IP address and reinstall the database; 2) rebuild the standby from the primary with gs_ctl build to restore data; 3) for multi-node failures, use service gaussdb/had query to confirm primary/standby roles and, if necessary, STOP Zone to take the faulty zone out of service; 4) contact technical support if the issue cannot be resolved in-house.

Applies to: Huawei Cloud GaussDB / GaussDB(DWS)0 views
MajorDatabase

GaussDB Node Addition / Storage Expansion Fails (Insufficient Underlying Resources)

Symptom

Adding a node or expanding storage fails in the console, with events such as GaussDBV5ExpandClusterFailed or GaussDBV5EnlargeVolumeFailed.

View cause and solution
Root cause

Usually caused by insufficient underlying resources, such as a shortage of available nodes, disk specifications or EIP resources.

Solution

1) Submit a service ticket from the top-right of the console to have the underlying resources arranged; 2) delete the failed node and retry the addition; 3) if a full disk has interrupted the service, expand the disk first; 4) check resource quotas and the maintenance window before scaling out or in.

Applies to: Huawei Cloud GaussDB / GaussDB(DWS)0 views
CriticalDatabase

GaussDB Primary/Standby Failure: Standby Promotion or HA Switchover Fails

Symptom

In HA mode the standby fails to be promoted, the primary/standby relationship is abnormal, application connections drop or reads/writes fail, and the console reports a primary/standby fault.

View cause and solution
Root cause

Underlying resource or network problems during switchover, or a previous primary/standby switchover whose balanced state has not recovered, blocking the promotion workflow.

Solution

1) Check instance status and primary/standby information in the management console, and restart the instance if needed; 2) confirm that underlying resources (CPU, memory, disk, network) are sufficient; 3) wait for the balanced state to recover; 4) if automatic switchover fails and service is interrupted, open a service ticket promptly for technical support. Always back up before major operations.

Applies to: Huawei Cloud GaussDB / GaussDB(DWS)0 views
MajorDatabase

GaussDB Backup Job Fails: Stale FIFO / Node Clock Skew / Metadata Permissions

Symptom

The backup job fails with errors such as Exception OSError: (12...) from a leftover FIFO, Cluster state is not balance, connect client timeout, or failure to create the Metadata directory, and the backup cannot complete.

View cause and solution
Root cause

(1) A database or job crash left stale .fifo files behind; (2) node clocks differ by more than 2 seconds, so the SSL certificate is not yet valid and the connection to the backup primary node fails; (3) the database user lacks permissions on the metadata storage directory; (4) a primary/standby switchover occurred and balanced has not returned to true.

Solution

1) Before the backup, remove leftover .fifo files under /home/omm/ on the client host; 2) synchronise all node clocks with NTP and retry; 3) change the owner or permissions of the metadata storage path so the database user can read and write it; 4) wait until the database balanced state is true before backing up; 5) if it still fails, open a service ticket for Huawei Cloud assistance.

Applies to: Huawei Cloud GaussDB / GaussDB(DWS)0 views
CriticalDatabase

GaussDB Instance Connection Failure: Security Group / VPC / Full Disk Read-Only

Symptom

Clients cannot connect to the GaussDB instance, reporting errors such as gsql: ERROR: dn_xxxx: Invalid username/password or a connection timeout; the instance status may also show as abnormal.

View cause and solution
Root cause

Common reasons: (1) for private connections the ECS and GaussDB are not in the same region or VPC; (2) the security group has no inbound rule for the port/source IP; (3) for public connections no EIP is bound (or it is misconfigured), or a network ACL blocks traffic; (4) wrong address, port, username or password; (5) the instance disk is full and the kernel has switched it to read-only, so writes fail.

Solution

1) Confirm the instance is healthy in the console and restart it if not; 2) private connections require the same region and VPC, or a VPC peering connection for cross-VPC access; 3) allow inbound traffic on the GaussDB port (for example 8000) in the security group; 4) for public access check EIP binding and network ACLs; 5) verify reachability with telnet address port; 6) if the disk is full, expand it to clear the read-only state.

Applies to: Huawei Cloud GaussDB / GaussDB(DWS)0 views
MajorDatabase

Repairing Corrupted MariaDB Tables: InnoDB Force Recovery / MyISAM REPAIR

Symptom

Queries or startup report table corruption and data cannot be read, or errors such as Incorrect information in file appear.

View cause and solution
Root cause

An unclean shutdown, disk damage, or an interrupted DDL (for example DDL_LOG Got error 1033 from MDEV-37795) corrupts InnoDB / MyISAM table structures or data.

Solution

1) InnoDB: add innodb_force_recovery=1 through 6 under [mysqld] (higher values are more aggressive), start the server and dump the data, then rebuild the instance afterwards; 2) MyISAM: repair indexes with myisamchk -c -r, or run CHECK TABLE / REPAIR TABLE inside the instance (stop the server and back up first); 3) always back up before repair to avoid further damage; 4) for remnants of a crashed DDL, locate the .frm or intermediate files, clean them up manually and restart.

Applies to: MariaDB 10.11 / 10.6 / 10.40 views
MajorDatabase

MariaDB Runs Out of Disk Space: Binary Log Build-Up / Full Data Directory

Symptom

Disk usage reaches 100%, writes fail or the database refuses service, and binary log files keep growing.

View cause and solution
Root cause

(1) Binary logs are never purged (max_binlog_size / expire_logs_days missing or set too large) and grow without limit; (2) the partition holding the data directory is filled by data or temporary files.

Solution

1) Inspect with SHOW BINARY LOGS and purge as needed using PURGE BINARY LOGS BEFORE 'YYYY-MM-DD'; 2) configure max_binlog_size and expire_logs_days (or binlog_expire_logs_seconds) for automatic cleanup; 3) if the data directory is full, remove unused files, archive historical data, or move datadir to a larger disk, fix permissions and restart; 4) enable and analyse the slow query log to reduce space usage.

Applies to: MariaDB 10.11 / 10.6 / 10.40 views
MajorDatabase

MariaDB Replication Failure: Position Mismatch / Galera Node Cannot Join the Cluster

Symptom

Replication lag, an interrupted replication link or replication errors; SHOW SLAVE STATUS shows Slave_IO / SQL abnormalities; a Galera node cannot join the cluster.

View cause and solution
Root cause

(1) Primary/replica positions do not line up (Master_Log_File / Read_Master_Log_Pos do not match the relay logs); (2) a large transaction or network jitter interrupts replication; (3) incorrect Galera (wsrep) configuration or an abnormal node state prevents the node from joining.

Solution

1) Use SHOW SLAVE STATUS to compare primary and relay positions, reset the replication position if necessary and restart the IO / SQL threads; 2) improve the network and reduce replica load; 3) for a Galera join failure, comment out the cluster configuration, start the node in standalone mode to repair it, then restore the cluster configuration; 4) configure replication retries plus monitoring and alerts.

Applies to: MariaDB 10.11 / 10.6 / 10.40 views
CriticalDatabase

MariaDB Service Crash: InnoDB Semaphore Wait / Killed by OOM / SEGV

Symptom

The mariadbd process exits unexpectedly; the log shows FATAL InnoDB: Semaphore wait has lasted > 600 seconds, got signal 11 (SEGV), or the process is killed by SIGKILL.

View cause and solution
Root cause

(1) An InnoDB semaphore wait times out (deadlock or hang) and the server aborts deliberately; (2) the OS OOM Killer terminates it under memory pressure (MariaDB uses a lot of memory and is often selected first); (3) a bug such as invalid memory access (SEGV) or an unsupported CPU instruction (SIGILL); (4) hardware faults (disk or RAM damage).

Solution

1) For semaphore waits, collect a full thread backtrace and investigate long transactions and lock waits; 2) for OOM kills, confirm memory pressure in the host logs, tune the buffer pool and connection count, and add memory; 3) for SEGV / bug cases, report the issue upstream with the SQL, EXPLAIN, SHOW CREATE TABLE and a core file; 4) repair or replace faulty disks/RAM for hardware issues. systemd's default SendSIGKILL=No can prevent a slow shutdown from being force-killed.

Applies to: MariaDB 10.11 / 10.6 / 10.40 views
CriticalDatabase

MariaDB Fails to Start: InnoDB Corruption / Corrupt MyISAM System Tables / systemd Restrictions

Symptom

systemctl start mariadb fails; the error log reports InnoDB: Database page corruption, damaged mysql system tables, a startup timeout, or Permission Denied.

View cause and solution
Root cause

(1) Corrupt InnoDB data pages (disk failure or power loss); (2) corrupt MyISAM system tables in the mysql database, which by default prevents startup entirely; (3) systemd defaults: ProtectHome=true blocks access to home/root, ProtectSystem=full restricts writable directories, and exceeding TimeoutStartSec=90 seconds also causes failure; (4) SELinux / AppArmor blocking non-default paths or ports.

Solution

1) Locate the cause in the logs with journalctl -xe or tail /var/log/mariadb/mariadb.log; 2) for InnoDB corruption, set innodb_force_recovery=3 to enter recovery mode, dump the data and rebuild the instance; 3) for corrupt MyISAM system tables, force a repair with myisam_recover_options or rebuild indexes with myisamchk; 4) for systemd restrictions set ProtectHome=off, ProtectSystem=off and a larger TimeoutStartSec in the unit; 5) for SELinux set permissive mode to diagnose, or for AppArmor add an alias and restart apparmor.

Applies to: MariaDB 10.11 / 10.6 / 10.40 views
MajorDatabase

OceanBase replica failure and standby tenant rebuild (SOP emergency response)

Symptom

A replica in the cluster fails and tenant availability is threatened; or a standby tenant's data becomes abnormal with replication broken beyond recovery.

View cause and solution
Root cause

(1) The OBServer hosting a replica fails, so an arbitration service is needed to keep the tenant available. (2) The standby tenant's data is corrupted or replication is abnormal, leaving the original standby tenant unusable.

Solution

1) Replica failure: enable the Arbitration Service before the quorum is affected so the tenant stays available; 2) standby tenant rebuild: rebuild it through the OCP standard operating procedure (SOP) — back up the primary tenant, decouple primary and standby, drop the old standby tenant, create a new one from the primary tenant's data and verify replication; 3) manual confirmation is recommended before critical steps; 4) plan backups and the arbitration service as part of routine operations.

Applies to: OceanBase 4.x / community edition0 views
CriticalDatabase

OceanBase Network Failure: NIC / Switch / Data Centre Network Problems

Symptom

Hosts become unreachable, the data centre network goes down, packet loss or latency is high, and multiple nodes in the cluster become abnormal.

View cause and solution
Root cause

(1) A faulty NIC or transmission errors on a host; (2) a switch failure inside the data centre; (3) a network failure between data centres; (4) the majority of replicas sitting in a network partition, which affects availability.

Solution

1) For a NIC failure, isolate the host and replace the node (this can be done directly in OCP); 2) for a switch failure, isolate the hosts attached to the faulty switch while ensuring the remaining hosts still form a majority; 3) for a data-centre-level failure, use Zone management to STOP / START Zone and shift traffic, relying on multi-replica high availability; 4) use tools such as obdiag to pinpoint the problem.

Applies to: OceanBase 4.x / Community Edition0 views
CriticalDatabase

OceanBase Will Not Start After File Corruption Caused by a Power Loss (No Equivalent of innodb_force_recovery)

Symptom

A power outage or disk failure corrupts local data files on a cluster or standalone deployment, and OceanBase cannot start normally.

View cause and solution
Root cause

(1) In a standalone deployment, OceanBase currently offers no public forced-recovery mode comparable to MySQL's innodb_force_recovery, so corrupted data files are essentially unrecoverable in place; (2) when a majority of replicas (half or more) fail simultaneously, recovery is strict and carries a risk of data loss, with no public workaround.

Solution

1) For minority-side file corruption: restore the host and rejoin the original cluster following the standard procedure, with no data loss; 2) for standalone corruption: restore from regular full backups plus continuous archive backups (OSS, S3 and COS are supported); 3) for majority failure: assess the situation and restore from backup, accepting the risk of data loss; 4) always maintain a backup strategy of periodic full backups plus log archiving so there is something to restore from.

Applies to: OceanBase 4.x / Community Edition0 views
CriticalDatabase

OceanBase Physical Restore Fails: no enough log for restore / Discontinuous Backup and Archive Logs

Symptom

ALTER SYSTEM RESTORE fails, or a tenant restore is stuck in the RESTORE_WAIT_LS / RESTORING state.

View cause and solution
Root cause

(1) The specified restore point lies outside the recoverable window and the archive logs are not continuous, giving error -4018 no enough log for restore; (2) a gap exists between the backup set and the archive logs; (3) cross-version restore is not allowed (you can only restore to the same or a newer version, for example V4.0.x cannot be restored to V4.1.0).

Solution

1) Check SELECT * FROM oceanbase.DBA_OB_ROOTSERVICE_EVENT_HISTORY WHERE module='physical_restore' for the error code; 2) confirm a usable backup set and continuous archive logs exist before the restore point (the recoverable window); 3) keep backup data plus log archiving continuous and versions compatible; 4) when stuck at RESTORE_WAIT_LS, query __all_virtual_ls_meta_table for replica restore status; 5) contact OceanBase technical support for complex cases.

Applies to: OceanBase 4.x / Community Edition0 views
CriticalDatabase

OceanBase OBServer Node Failure: Heartbeat Lost / Process Crash / Killed by OOM

Symptom

An OBServer node becomes unreachable and the cluster raises an alarm, or the observer process exits unexpectedly and some tenant requests fail.

View cause and solution
Root cause

(1) The node is down; once the heartbeat has been lost for longer than server_permanent_offline_time (2 hours by default) it is permanently removed, its replicas are cleared and a full rebuild is required; (2) the observer process crashes (bug or signal); (3) the host runs out of memory and the OOM Killer terminates it; (4) a NIC or switch failure cuts network connectivity.

Solution

1) If it can be fixed quickly, bring the node back as soon as possible: recovery within 2 hours only requires catching up incremental data, while exceeding the threshold requires node replacement and a data rebuild; 2) for a crash, start the process manually, collect the core and cluster logs, and contact the vendor if needed; 3) for an OOM kill, confirm the memory problem in the host and OBServer logs, then add memory or tune the configuration; 4) for a network failure, isolate the faulty host and replace the node while ensuring the remaining replicas form a majority. Use obdiag gather core to collect diagnostics in one step.

Applies to: OceanBase 4.x / Community Edition0 views
Hit the same problem? Ask us now
Call us Message
Home Services Consult Message