Skip to content

Commit be824a9

Browse files
fix(rdb): new troubleshooting pages (#4315)
1 parent d65d19a commit be824a9

File tree

5 files changed

+234
-1
lines changed

5 files changed

+234
-1
lines changed

faq/databases-for-postgresql-and-mysql.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ meta:
55
content:
66
h1: Managed Database for PostgreSQL and MySQL
77
dates:
8-
validation: 2024-01-29
8+
validation: 2025-01-29
99
category: managed-databases
1010
productIcon: PostgresqlMysqlProductIcon
1111
---

menu/navigation.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,6 +2282,18 @@
22822282
},
22832283
{
22842284
"items": [
2285+
{
2286+
"label": "Dealing with Database Instance unavailability",
2287+
"slug": "database-instance-unavailable"
2288+
},
2289+
{
2290+
"label": "Dealing with Database Instance connectivity issues",
2291+
"slug": "database-instance-connectivity-issues"
2292+
},
2293+
{
2294+
"label": "Dealing with Database Instance performance issues",
2295+
"slug": "database-instance-performance-issues"
2296+
},
22852297
{
22862298
"label": "Dealing with disk_full state in a Database Instance",
22872299
"slug": "disk-full"
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
meta:
3+
title: Dealing with Database Instance connectivity issues
4+
description: Troubleshoot Database Instance connectivity issues for Managed Databases for MySQL and PostgreSQL.
5+
content:
6+
h1: Dealing with Database Instance connectivity issues
7+
paragraph: Troubleshoot Database Instance connectivity issues for Managed Databases for MySQL and PostgreSQL.
8+
tags: disk-full databases
9+
dates:
10+
validation: 2025-01-29
11+
posted: 2025-01-29
12+
categories:
13+
- managed-databases
14+
- postgresql-and-mysql
15+
---
16+
17+
## Public access
18+
19+
### Problem
20+
21+
I cannot connect to my Database Instance through the public network.
22+
23+
### Possible causes
24+
25+
- The Database Instance TLS certificate is outdated
26+
- Your allowed IPs are not properly configured
27+
- You have reached the maximum number of connections
28+
- The Database Instance is experiencing instabilities due to a high load
29+
30+
### Solution
31+
32+
You can check the following points to identify and act on what might be causing the issue:
33+
34+
1. If TLS is enabled on the Database Instance, make sure the certificate is up to date, and that your client application is properly configured.
35+
2. Make sure your [ACLs](/managed-databases-for-postgresql-and-mysql/concepts/#allowed-ips) are [properly configured](/managed-databases-for-postgresql-and-mysql/how-to/manage-allowed-ip-addresses).
36+
3. Make sure your Database Instance has not reached the maximum number of connections stipulated in the advanced settings of the Database Instance. You can monitor the number of connections on [Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit). You can also [adjust the advanced settings](/managed-databases-for-postgresql-and-mysql/how-to/configure-advanced-settings) to accept a higher number of connections.
37+
4. [Monitor other usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to:
38+
39+
- Check if the memory usage is nominal. High memory usage could trigger OOM Kills and cause disconnection
40+
- Check Database Instance logs and look for anything else that could explain the issue
41+
42+
## Private access
43+
44+
### Problem
45+
46+
I cannot connect to my Database Instance through a Private Network.
47+
48+
### Possible causes
49+
50+
- The Database Instance TLS certificate is outdated
51+
- Client network issue
52+
- You have reached the maximum number of connections
53+
- The Database Instance is experiencing instabilities due to a high load
54+
55+
### Solution
56+
57+
You can carry out the following actions:
58+
59+
1. Try to connect to the Database Instance from the public endpoint, if one is available, to identify the possible origin (network or instance). This information can help you or the support team to identify the issue.
60+
2. [Use Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to check database logs and look for any activity or behavior that could explain the issue.
61+
3. Create a support ticket if the first two steps do not help troubleshoot the issue. In the body of the ticket, make sure you provide:
62+
63+
- The resource ID of resource from which the connection was attempted
64+
- The output of the `rdb_troubleshoot.sh` script, indicated below. Make sure you execute the script on the machine from which the connection was attempted.
65+
66+
#### Database Instance connectivity check script
67+
68+
`rdb_troubleshoot.sh`:
69+
70+
```sh
71+
#!/bin/bash
72+
73+
set -o nounset
74+
75+
if [ -z "$INSTANCE_IP" ]; then
76+
echo "INSTANCE_IP is a mandatory environment variable."
77+
echo "e.g. export INSTANCE_IP=<xxx.xxx.xxx.xxx>"
78+
exit 1
79+
fi
80+
81+
if [ -z "$INSTANCE_PORT" ]; then
82+
echo "INSTANCE_PORT is a mandatory environment variable."
83+
echo "e.g. export INSTANCE_PORT=<xxxxx>"
84+
exit 1
85+
fi
86+
87+
function header() {
88+
echo -e "\n # ${1}"
89+
echo -e "---------------------------------\n"
90+
}
91+
92+
echo -e "\nRDB troubleshooting script\nThis script will run for several minutes to get enough information."
93+
header "Host information"
94+
if ! [ -x "$(command -v uname)" ]; then
95+
echo 'Skipped: uname command is not availabe.'
96+
else
97+
uname -a
98+
fi
99+
100+
header "Host connectivity check"
101+
if ! [ -x "$(command -v ping)" ]; then
102+
echo 'Skipped: ping command is not availabe.'
103+
else
104+
ping -c 5 ${INSTANCE_IP}
105+
fi
106+
107+
header "Database connectivity check"
108+
if ! [ -x "$(command -v telnet)" ]; then
109+
# try to fallback on curl telnet
110+
if ! [ -x "$(command -v curl)" ]; then
111+
echo "Skipped: neither telnet nor curl command are availabe."
112+
else
113+
echo "(using curl)"
114+
timeout 2 curl -v telnet://$INSTANCE_IP:$INSTANCE_PORT
115+
fi
116+
else
117+
echo "(using telnet)"
118+
echo -n | telnet ${INSTANCE_IP} ${INSTANCE_PORT}
119+
fi
120+
121+
header "Ip configuration check"
122+
if ! [ -x "$(command -v ip)" ]; then
123+
echo 'Skipped: ip command is not availabe.'
124+
else
125+
echo -e "Interfaces:\n- \n"
126+
ip a
127+
echo -e "\nNeighbour:\n- \n"
128+
129+
TEST_ITERATION=30
130+
TEST_INTERVAL=10 # seconds
131+
132+
# Iterate a few times to try to catch relevant info
133+
for ((i=1;i<=$TEST_ITERATION;i++)); do
134+
echo -e "\nIteration $i:\n"
135+
ip neighbour show
136+
echo -e "\nWaiting ${TEST_INTERVAL}s...\n"
137+
sleep $TEST_INTERVAL
138+
done
139+
echo -e "\nRoute:\n-\n"
140+
ip route
141+
fi
142+
```
143+
Run the script in a terminal:
144+
145+
```
146+
export INSTANCE_IP=<xxx.xxx.xxx.xxx>
147+
export INSTANCE_PORT=<xxxxx>
148+
./troubleshoot.sh
149+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
meta:
3+
title: Dealing with Database Instance performance issues
4+
description: Troubleshoot Database Instance performance issues in Managed Databases for MySQL and PostgreSQL.
5+
content:
6+
h1: Dealing with Database Instance performance issues
7+
paragraph: Troubleshoot Database Instance performance issues in Managed Databases for MySQL and PostgreSQL.
8+
tags: disk-full databases
9+
dates:
10+
validation: 2025-01-29
11+
posted: 2025-01-29
12+
categories:
13+
- managed-databases
14+
- postgresql-and-mysql
15+
---
16+
17+
## Problem
18+
19+
My Database Instance is not performing as expected.
20+
21+
## Possible causes
22+
23+
- High data loads
24+
- High incoming traffic from specific apps or websites
25+
- Huge or sub-optimized SQL queries
26+
27+
## Solution
28+
29+
You can carry out the following actions:
30+
31+
1. [Monitor usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to:
32+
33+
- Check if the usage is nominal. The Database Instance can be impacted by high data loads or unexpected high traffic from an app or website, for example. You can [upgrade your Instance](/managed-databases-for-postgresql-and-mysql/how-to/upgrade-a-database) if necessary.
34+
- Check if there are slow queries in the Database Instance log. Huge or sub-optimized queries can slow down the instance significantly, or even fill up all the memory and trigger OOM kills.
35+
36+
2. Try connecting to the Database Instance in a [Private Network](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network). Public endpoint traffic for Managed Databases for MySQL and PostgreSQL goes through a load balancer, which adds significant latency. Using a Private Network also ensures better security, which makes it the recommended way to connect to a Managed Database.
37+
38+
3. Upgrade your storage volume solution. New Block Storage volumes provide improved performance compared to the Block Storage Legacy, for example.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
meta:
3+
title: Dealing with Database Instance unavailability
4+
description: Troubleshoot Database Instance unavailability for Managed Databases for MySQL and PostgreSQL.
5+
content:
6+
h1: Dealing with Database Instance unavailability
7+
paragraph: Troubleshoot Database Instance unavailability for Managed Databases for MySQL and PostgreSQL.
8+
tags: disk-full databases
9+
dates:
10+
validation: 2025-01-29
11+
posted: 2025-01-29
12+
categories:
13+
- managed-databases
14+
- postgresql-and-mysql
15+
---
16+
17+
## Problem
18+
19+
My Database Instance is unavailable.
20+
21+
## Possible causes
22+
23+
- High data loads
24+
- High incoming traffic from specific apps or websites
25+
26+
## Solution
27+
28+
You can monitor your Database Instance activity to be able to quickly identify and act on irregular activities that might be causing the instability/unavailability.
29+
30+
[Monitor usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to:
31+
32+
- Check if the usage is regular. Database Instance can be impacted by high data loads or unexpected high traffic from an app or website, for example
33+
- Check if there are slow queries in the Database Instance log. Huge or sub-optimized queries can fill up all the memory and trigger OOM kills
34+
- Check the Database Instance logs for any unusual or suspicious activity

0 commit comments

Comments
 (0)