-
Notifications
You must be signed in to change notification settings - Fork 259
fix(rdb): new troubleshooting pages #4315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
64fd70e
fix(rdb): troubleshooting
ldecarvalho-doc 0d049ca
fix(rdb): review bastien
ldecarvalho-doc 34cc5b1
fix(rdb): review bastien 2
ldecarvalho-doc 55385aa
fix(rdb): review ro
ldecarvalho-doc e207aaf
fix(rdb): date faq
ldecarvalho-doc 035b9fd
fix(rdb): review ro 2
ldecarvalho-doc 843f0de
fix(rdb): reviews
ldecarvalho-doc 75e9baf
fix(rdb): reviews 2
ldecarvalho-doc 4a95dfb
fix(rdb): review bene
ldecarvalho-doc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
149 changes: 149 additions & 0 deletions
149
...-postgresql-and-mysql/troubleshooting/database-instance-connectivity-issues.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| --- | ||
| meta: | ||
| title: Dealing with Database Instance connectivity issues | ||
| description: Troubleshoot Database Instance connectivity issues for Managed Databases for MySQL and PostgreSQL. | ||
| content: | ||
| h1: Dealing with Database Instance connectivity issues | ||
| paragraph: Troubleshoot Database Instance connectivity issues for Managed Databases for MySQL and PostgreSQL. | ||
| tags: disk-full databases | ||
| dates: | ||
| validation: 2025-01-29 | ||
| posted: 2025-01-29 | ||
| categories: | ||
| - managed-databases | ||
| - postgresql-and-mysql | ||
| --- | ||
|
|
||
| ## Public access | ||
|
|
||
| ### Problem | ||
|
|
||
| I cannot connect to my Database Instance through the public network. | ||
|
|
||
| ### Possible causes | ||
|
|
||
| - The Database Instance TLS certificate is outdated | ||
| - Your allowed IPs are not properly configured | ||
| - You have reached the maximum number of connections | ||
| - The Database Instance is experiencing instabilities due to a high load | ||
|
|
||
| ### Solution | ||
|
|
||
| You can check the following points to identify and act on what might be causing the issue: | ||
|
|
||
| 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. | ||
| 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). | ||
| 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. | ||
| 4. [Monitor other usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to: | ||
|
|
||
| - Check if the memory usage is nominal. High memory usage could trigger OOM Kills and cause disconnection | ||
| - Check Database Instance logs and look for anything else that could explain the issue | ||
|
|
||
| ## Private access | ||
|
|
||
| ### Problem | ||
|
|
||
| I cannot connect to my Database Instance through a Private Network. | ||
|
|
||
| ### Possible causes | ||
|
|
||
| - The Database Instance TLS certificate is outdated | ||
| - Client network issue | ||
| - You have reached the maximum number of connections | ||
| - The Database Instance is experiencing instabilities due to a high load | ||
ldecarvalho-doc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Solution | ||
ldecarvalho-doc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| You can carry out the following actions: | ||
|
|
||
| 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. | ||
ldecarvalho-doc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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. | ||
| 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: | ||
|
|
||
| - The resource ID of resource from which the connection was attempted | ||
| - 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. | ||
|
|
||
| #### Database Instance connectivity check script | ||
|
|
||
| `rdb_troubleshoot.sh`: | ||
|
|
||
| ```sh | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
|
|
||
| if [ -z "$INSTANCE_IP" ]; then | ||
| echo "INSTANCE_IP is a mandatory environment variable." | ||
| echo "e.g. export INSTANCE_IP=<xxx.xxx.xxx.xxx>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$INSTANCE_PORT" ]; then | ||
| echo "INSTANCE_PORT is a mandatory environment variable." | ||
| echo "e.g. export INSTANCE_PORT=<xxxxx>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| function header() { | ||
| echo -e "\n # ${1}" | ||
| echo -e "---------------------------------\n" | ||
| } | ||
|
|
||
| echo -e "\nRDB troubleshooting script\nThis script will run for several minutes to get enough information." | ||
| header "Host information" | ||
| if ! [ -x "$(command -v uname)" ]; then | ||
| echo 'Skipped: uname command is not availabe.' | ||
| else | ||
| uname -a | ||
| fi | ||
|
|
||
| header "Host connectivity check" | ||
| if ! [ -x "$(command -v ping)" ]; then | ||
| echo 'Skipped: ping command is not availabe.' | ||
| else | ||
| ping -c 5 ${INSTANCE_IP} | ||
| fi | ||
|
|
||
| header "Database connectivity check" | ||
| if ! [ -x "$(command -v telnet)" ]; then | ||
| # try to fallback on curl telnet | ||
| if ! [ -x "$(command -v curl)" ]; then | ||
| echo "Skipped: neither telnet nor curl command are availabe." | ||
| else | ||
| echo "(using curl)" | ||
| timeout 2 curl -v telnet://$INSTANCE_IP:$INSTANCE_PORT | ||
| fi | ||
| else | ||
| echo "(using telnet)" | ||
| echo -n | telnet ${INSTANCE_IP} ${INSTANCE_PORT} | ||
| fi | ||
|
|
||
| header "Ip configuration check" | ||
| if ! [ -x "$(command -v ip)" ]; then | ||
| echo 'Skipped: ip command is not availabe.' | ||
| else | ||
| echo -e "Interfaces:\n- \n" | ||
| ip a | ||
| echo -e "\nNeighbour:\n- \n" | ||
|
|
||
| TEST_ITERATION=30 | ||
| TEST_INTERVAL=10 # seconds | ||
|
|
||
| # Iterate a few times to try to catch relevant info | ||
| for ((i=1;i<=$TEST_ITERATION;i++)); do | ||
| echo -e "\nIteration $i:\n" | ||
| ip neighbour show | ||
| echo -e "\nWaiting ${TEST_INTERVAL}s...\n" | ||
| sleep $TEST_INTERVAL | ||
| done | ||
| echo -e "\nRoute:\n-\n" | ||
| ip route | ||
| fi | ||
| ``` | ||
| Run the script in a terminal: | ||
|
|
||
| ``` | ||
| export INSTANCE_IP=<xxx.xxx.xxx.xxx> | ||
| export INSTANCE_PORT=<xxxxx> | ||
| ./troubleshoot.sh | ||
| ``` | ||
38 changes: 38 additions & 0 deletions
38
...r-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| meta: | ||
| title: Dealing with Database Instance performance issues | ||
| description: Troubleshoot Database Instance performance issues in Managed Databases for MySQL and PostgreSQL. | ||
| content: | ||
| h1: Dealing with Database Instance performance issues | ||
| paragraph: Troubleshoot Database Instance performance issues in Managed Databases for MySQL and PostgreSQL. | ||
| tags: disk-full databases | ||
| dates: | ||
| validation: 2025-01-29 | ||
| posted: 2025-01-29 | ||
| categories: | ||
| - managed-databases | ||
| - postgresql-and-mysql | ||
| --- | ||
|
|
||
| ## Problem | ||
|
|
||
| My Database Instance is not performing as expected. | ||
|
|
||
| ## Possible causes | ||
|
|
||
| - High data loads | ||
| - High incoming traffic from specific apps or websites | ||
ldecarvalho-doc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Huge or sub-optimized SQL queries | ||
|
|
||
| ## Solution | ||
|
|
||
| You can carry out the following actions: | ||
|
|
||
| 1. [Monitor usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to: | ||
|
|
||
| - 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. | ||
| - 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. | ||
|
|
||
| 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. | ||
ldecarvalho-doc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 3. Upgrade your storage volume solution. New Block Storage volumes provide improved performance compared to the Block Storage Legacy, for example. | ||
34 changes: 34 additions & 0 deletions
34
...ases-for-postgresql-and-mysql/troubleshooting/database-instance-unavailable.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| meta: | ||
| title: Dealing with Database Instance unavailability | ||
| description: Troubleshoot Database Instance unavailability for Managed Databases for MySQL and PostgreSQL. | ||
| content: | ||
| h1: Dealing with Database Instance unavailability | ||
| paragraph: Troubleshoot Database Instance unavailability for Managed Databases for MySQL and PostgreSQL. | ||
| tags: disk-full databases | ||
| dates: | ||
| validation: 2025-01-29 | ||
| posted: 2025-01-29 | ||
| categories: | ||
| - managed-databases | ||
| - postgresql-and-mysql | ||
| --- | ||
|
|
||
| ## Problem | ||
|
|
||
| My Database Instance is unavailable. | ||
|
|
||
| ## Possible causes | ||
|
|
||
| - High data loads | ||
| - High incoming traffic from specific apps or websites | ||
|
|
||
| ## Solution | ||
|
|
||
| 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. | ||
|
|
||
| [Monitor usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to: | ||
|
|
||
| - 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 | ||
| - 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 | ||
| - Check the Database Instance logs for any unusual or suspicious activity |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.