Skip to content

Commit

Permalink
feat(fdb): review franck 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ldecarvalho-doc committed Sep 12, 2023
1 parent 0761dc5 commit 0a153ef
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
meta:
title: Understanding the autohealing feature
description: Learn more about the autohealing feature for Managed Database for PostgreSQL and MySQL
content:
h1: Understanding the autohealing feature
paragraph: Learn more about the autohealing feature for Managed Database for PostgreSQL and MySQL
tags: databases ha high-availability autohealing database-nodes
categories:
- managed-databases
- postgresql-and-mysql
---

At Scaleway, High Availability Database Instances are continuously monitored and benefit from the autohealing feature.

This feature is what guarantees your Database Instance will remain available even when of its nodes are down.

If your main database node goes down, the standby node will begin handling write operations in 30 to 60 seconds, depending on the type of failure. Intense writing activity may result in an increase of the failover time.

Your Database Instance then goes into autohealing mode and switches to the `AUTOHEALING` status (represented by a blue dot in the Scaleway console).

Your Database Instance will work only with the standby node for at most 700 seconds.

After 700 seconds, if your main database node is still considered as down, a new node is spawned and automatically configured as a standby database node. Your initial standby nodes become the main one.

Once this process is complete, your Database Instance goes back to `READY` status (represented by the green dot in the Scaleway console).
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
meta:
title: Dealing with disk_full mode in a Database Instance
description: This page helps you troubleshoot issues that occurr when your Database Instance volume is near full capacity.
content:
h1: Dealing with disk_full mode in a Database Instance
paragraph: This page helps you troubleshoot issues that occurr when your Database Instance volume is near full capacity.
tags: disk-full databases
dates:
validation: 2023-06-13
posted: 2023-02-16
categories:
- managed-databases
- postgresql-and-mysql
---

Whenever your Database Instance volume is close to reaching full capacity, your Database Instance switches to `disk_full` mode.

The Database Instance switches to `disk_full` mode when the amount of free space in the volume falls under 2% of the total volume size.

For Database Instances where 2% of the volume size is more than 2 GB, this threshold is 2 GB.

This state allows you to increase your volume, if you use Block Storage, or [upgrade your node type](/managed-databases/postgresql-and-mysql/how-to/upgrade-a-database/). You are also able to clear some space in your volume to increase your capacity.

When the Database Instance switches to `disk_full` state, the default transaction mode automatically switches to `read only`. This allows your applications to still access its data, while preventing new data from being added.

If you wish to clear out space in your Database Instance volume, you can carry out the following actions:

1. [Connect to your Database Instance](/managed-databases/postgresql-and-mysql/how-to/connect-database-instance).
2. Run the following commands to shift to a `read write` transaction:
```sql
-- On PostgreSQL
BEGIN;
SET TRANSACTION READ WRITE;
```

```sql
-- On MySQL
SET transaction_read_only=0;
BEGIN;
```
3. Clear out data from your database.
4. Commit your changes.
```
COMMIT;
```

When there is once again enough space available in the Database Instance, the default transaction mode changes back to `read write`, allowing operations to return to normal.

<Message type="important">
Failing to clear out some of your data, or forcing insertions while the database is in `disk_full` mode leads to downtime
</Message>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
meta:
title: Managed Document Databases - Troubleshooting
description: Managed Document Databases Troubleshooting
content:
h1: Managed Document Databases - Troubleshooting
paragraph: Managed Document Databases Troubleshooting
---

0 comments on commit 0a153ef

Please sign in to comment.