Error on Mariadb & Apache

0

Hi at ALL I am currently facing a critical issue with my website, and I urgently need assistance to resolve it. Below is a summary of the problem:

Overview: Website: sub.domainName.com Hosting: AWS Lightsail CDN: Cloudflare Issue Timeline: On November 13th, I encountered problems uploading images via WordPress media library. Followed guides to fix, including adding define( 'UPLOADS', 'wp-content/uploads' ); to wp-config.php and enabling user via SSH. Successfully uploaded images via WordPress. In the evening, after making several changes in wp-admin, the site stopped working. Actions Taken: Paused Cloudflare but the issue persisted. ( Now ia Active ) Followed guides to fix Cloudflare error 521. Added IPs to .htaccess. Changed Cloudflare security settings. Flex > to > Full & make off proxy / re-put Flex & when i understand the process don’t solve anything Run diagnostic tools like bndiagnostic-tool. (bug on Apache & MariaDB)

[[Apache]

Found recent error or warning messages in the Apache error log. Press [Enter] to continue:

[Mon Nov 13 23:33:26.765014 2023] [proxy_fcgi:error] [pid 135622:tid
140575772546816] (70007)The timeout specified has expired: [client
**ip_address**:39408] AH01075: Error dispatching request to : (polling)
[Tue Nov 14 03:19:56.445034 2023] [proxy_fcgi:error] [pid 135622:tid
140575864866560] [client **ip_address**:60690] AH01071: Got error 'PHP message:
PHP Warning: Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php
on line 173PHP message: PHP Warning: Undefined array key "HTTP_HOST" in
/bitnami/wordpress/wp-config.php on line 174'
[Tue Nov 14 03:21:46.286721 2023] [proxy_fcgi:error] [pid 135622:tid
140575814510336] [client **ip_address**:34120] AH01071: Got error 'PHP message:
PHP Warning: Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php
on line 173PHP message: PHP Warning: Undefined array key "HTTP_HOST" in
/bitnami/wordpress/wp-config.php on line 174'


Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro rs-apache/

? Mariadb:

Found recent error message in MariaDB error log: ??:0(std::error_code::default_error_condition() const)[0x7f92fa5c1ed0]

i try : sudo /opt/bitnami/ctlscript.sh restart there is no change…

Diagnostic Tool Output: Resources: Low available RAM. Connectivity: Server ports 22, 80, and/or 443 not publicly accessible. MariaDB: Recent error messages. Apache: Recent error messages. PHP: No issues found. Error Messages: Cloudflare error 521. Apache error log warnings related to wp-config.php. Current Status: Site not working. Proxied vs. non-proxied (direct to origin) configurations tested on Cloudflare // this process don’t solve anything Urgency: This issue is critical, and the website has been down for a considerable time. AWS Lightsail support has not provided a timely resolution. I kindly request your immediate attention and expertise to help identify and resolve the root cause of this issue. Your assistance is highly appreciated. Thank you for your prompt attention to this matter. Best regards,

asked 5 months ago214 views
3 Answers
0

It seems you are dealing with a multi-layered issue affecting your WordPress site's functionality. Here's my take at a structured approach to diagnosing and potentially resolving the problem:

  1. Cloudflare Error 521:

    • This error indicates that Cloudflare is unable to establish a connection with your server.
    • Since pausing Cloudflare didn't resolve the issue, it's possible that the problem lies with your server settings or resource allocation.
  2. Server Resource Issues:

    • Low RAM could be causing the server to fail to respond to Cloudflare's requests.
    • Consider scaling your AWS Lightsail instance to provide more resources.
  3. Apache and MariaDB Errors:

    • The timeout errors from Apache suggest that PHP-FPM is taking too long to respond. This could be due to resource constraints or configuration issues.
    • The errors related to wp-config.php and undefined array key "HTTP_HOST" indicate a potential misconfiguration in your WordPress settings.
    • The standard error message from MariaDB regarding std::error_code::default_error_condition() is rather vague, but it might be connected to the low RAM issue as well.
  4. Connectivity:

    • If ports 22, 80, and 443 are not publicly accessible, this could also be part of the issue. Make sure your AWS security groups and network ACLs allow traffic on these ports.
  5. Troubleshooting Steps:

    • Resolve Resource Issues: Upgrade your server or allocate more resources to handle the load.
    • Fix Apache Configuration:
      • Increase the PHP-FPM timeout settings.
      • Check for any .htaccess misconfigurations.
    • Resolve PHP Warnings:
      • Address the HTTP_HOST warnings in wp-config.php by ensuring that the $_SERVER['HTTP_HOST'] variable is defined or by providing a fallback value.
    • MariaDB:
      • Investigate the MariaDB error further by checking the MariaDB error log for more details.
    • Networking:
      • Ensure that the AWS security groups and network ACLs are configured to allow traffic on the necessary ports.
    • Cloudflare Settings:
      • Revisit Cloudflare settings to ensure that SSL/TLS encryption mode is correctly set to “Full” if you have a valid SSL certificate on your server, or to “Flexible” if you don't.
      • Make sure that the Cloudflare IP ranges are whitelisted on your server's firewall.
  6. Monitoring:

    • Once the above steps are taken, monitor the server logs to see if the errors persist.
    • Utilize Cloudflare's analytics to check for any network-related issues.

Given the complexity and critical nature of the issue, if these steps do not resolve the problem, and you still have a support case open, request further escalation with the Lightsail team if that option is available to you. Additionally, it's important to ensure that you have backups of your website before making significant changes.

AWS
Drew D
answered 5 months ago
0

Hi,

You can follow this doc to check your Lightsail instance firewall settings and see if it comply with Cloudflare requirements https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-firewall-and-port-mappings-in-amazon-lightsail

If RAM is the constraint, you can also consider migrate to a larger instance, you can follow this doc to launch a new instance from snapshot https://lightsail.aws.amazon.com/ls/docs/en_us/articles/how-to-create-larger-instance-from-snapshot-using-console

AWS
yujie
answered 5 months ago
0

in the end the problem proved to be too challenging, even with your help... I followed several steps but nothing. I took another older instance and worked on that, eliminating the one with the error. Thanks anyway for your assistance

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions