-1

EDIT3: Read-write splitting seems the answer as pointed by out the user dbdemon in the linked question.

Internal MariaDB error code: 1927 ('Connection was killed')

EDIT2: https://drupal.stackexchange.com/questions/68350/high-performance-db-cluster-with-drupal

EDIT: After increasing to 4 cores each node, the log is clearer.

My mariadb cluster is crashing (SIGTERM) or freezing with corrupted data and 100% CPU. The 3 nodes run on 1 core each. I could not find minimum requirements for mariadb,

Is there any way to calculate the required CPU power for mariadb?

References will be appreciated :-)

Edit: The data was not corrupted as far as mariadb/galera were concerned, but seems it was partial since the application (drupal) returned PHP errors (http 500)

The cpu is 2nd generation single thread.

Two nodes serve end-users and one is for internal use, the one for internal use maintained integrity and I could recover from it by dumping and restoring.

2 Answers2

0

Is there any way to calculate the required CPU power for mariadb?

That very much depends on your data, schema, and workloads, so there is no easy answer.

A small database with occasional access will run quite happily on an atom (heck, possibly on an old 486 if you happen to have one lying around!) and large one especially if its design or queries are not optimal may need several of the latest, greatest, massively-multi-core, server-GHz CPUs.

crashing with corrupted data and 100% CPU

Thrashing a CPU should not cause corruption. Unless it has a physical problem and is overheating under load, but even then if you are using a transactional database engine (which IIRC MariaDB does by default) your data should be in a consistent state upon recovery.

To try diagnose the crash you need to look at log file entries around the time, also check hardware monitoring logs if you have any. See the question mustaccio referenced for some initial pointers.

You state any detail about the existing hardware. A single core of what sort of CPU? Does this mean you are operating in a virtual environment? If is it one that has dynamic memory allocation then perhaps you are on massively oversold nodes and your processes are getting killed due to using a lot of memory.

David Spillett
  • 32,593
  • 3
  • 50
  • 92
0

Fixed by upgrading MariaDB, and confirmed bug in an old version.