bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 44 forks source link

[Bitnami Wordpress] Server regularly goes down with 503 #1703

Open yeswordpress opened 3 weeks ago

yeswordpress commented 3 weeks ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

4d8d8a1c-c760-9473-a1e6-4ef2013aa09b

bndiagnostic output

===== Begin of bndiagnostic tool output =====

    ? Resources: Found possible issues
    ? Connectivity: Found possible issues
    ? Mariadb: Found possible issues
    ✓ Processes: No issues found
    ✓ Wordpress: No issues found
    ? Apache: Found possible issues
    ✓ Php: No issues found

[Resources]

Your instance has little available RAM memory.

 total used free shared buff/cache available Mem: 453 312 9 53 131 75 Swap: 634
187 447

You could try to increase your instance's memory. Please check your cloud
provider's documentation for more information.

[Connectivity]

Server ports 22, 80 and/or 443 are not publicly accessible. Please check the
following guide to open server ports for remote access:

https://docs.bitnami.com/general/faq/administration/use-firewall/

[Mariadb]

Found recent error messages in the MariaDB error log:
2024-11-01 7:30:33 4 [Warning] Aborted connection 4 to db: 'bitnami_wordpress'
user: 'bn_wordpress' host: '**ip_address**' (Got an error reading communication
packets)

Please check the following guide to troubleshoot MariaDB issues:

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

[Apache]

[Fri Nov 01 07:30:34.649221 2024] [proxy:error] [pid 2754309:tid
140448584627968] (2)No such file or directory: AH02454: FCGI: attempt to connect
to Unix domain socket /opt/bitnami/php/var/run/www.sock (www-fpm:8000) failed
 [Fri Nov 01 07:30:34.649265 2024] [proxy_fcgi:error] [pid 2754309:tid
140448584627968] [client **ip_address**:63267] AH01079: failed to make
connection to backend: httpd-UDS, referer:
https://bazisamericas.com/takeaways-from-ephmra-2019/
 [Fri Nov 01 07:41:42.291295 2024] [proxy_fcgi:error] [pid 2755431:tid
140395962951424] [client **ip_address**:60000] AH01071: Got error 'PHP message:
PHP Warning: Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php
on line 107; PHP message: PHP Warning: Undefined array key "HTTP_HOST" in
/bitnami/wordpress/wp-config.php on line 108'

Please check the following guide to troubleshoot server issues:

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

bndiagnostic was not useful. Could you please tell us why?

it does not solve any problems, I could look up to logs by myself

Describe your issue as much as you can

I don't know what's the problem with Wordpress. Via access log I could see 503 error from time to time at the certain pages (it works with standard Gutenberg blocks, contains some images (not huge, less than 500Kb each)

8.222.195.215 - - [01/Nov/2024:02:04:23 +0000] "GET /takeaways-from-ephmra-2019/ HTTP/1.1" 503 299

Error log contains constant FastCGI fails, it shuts down and never recovers by itself for no reason. Only manual restart helps.

[Thu Oct 31 19:57:03.489357 2024] [proxy_fcgi:error] [pid 2749161:tid 140198989944576] [client 198.235.24.132:57279] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 107; PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 108'
[Fri Nov 01 00:40:19.956357 2024] [proxy_fcgi:error] [pid 2748833:tid 140199971366656] [client 94.20.147.22:18240] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 107; PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 108; PHP message: PHP Warning:  Undefined array key 3 in /bitnami/wordpress/wp-content/plugins/eps-301-redirects/eps-301-redirects.php on line 564; PHP message: PHP Warning:  Undefined array key 3 in /bitnami/wordpress/wp-content/plugins/eps-301-redirects/eps-301-redirects.php on line 564; PHP message: PHP Warning:  Undefined array key 3 in /bitnami/wordpress/wp-content/plugins/eps-301-redirects/eps-301-redirects.php on line 564; PHP message: PHP Warning:  Undefined array key 3 in /bitnami/wordpress/wp-content/plugins/eps-301-redirects/eps-301-redirects.php on line 564; PHP message: PHP Warning:  Undefined array key 3 in /bitnami/wordpress/wp-content/plugins/eps-301-redirects/eps-301-redirects.php on line 564; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 714; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 715; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 725; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 728; PHP message: PHP Warning:  Undefined array key "scheme" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 749; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 714; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 715; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 725; PHP message: PHP Warning:  Undefined array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 728; PHP message: PHP Warning:  Undefined array key "scheme" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 749; PHP message: PHP Warning:  Undefined array key "host" in /bitnami/wordpress/wp-content/plugins/complianz-gdpr/cookiebanner/class-banner-loader.php on line 450; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2054; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2055; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2056; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2057; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2058; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2061; PHP message: PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /bitnami/wordpress/wp-content/themes/elision/functions.php on line 2120; PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-content/plugins/popups/public/includes/class-spu-rules.php on line 97'
[Fri Nov 01 00:44:11.892065 2024] [proxy_fcgi:error] [pid 2748833:tid 140199845476096] [client 198.235.24.241:57329] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 107; PHP message: PHP Warning:  Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 108'
[Fri Nov 01 02:04:40.821029 2024] [proxy_fcgi:error] [pid 2749161:tid 140199199762176] [client 8.222.195.215:54032] AH01067: Failed to read FastCGI header
[Fri Nov 01 02:04:40.827332 2024] [proxy_fcgi:error] [pid 2749161:tid 140199199762176] (104)Connection reset by peer: [client 8.222.195.215:54032] AH01075: Error dispatching request to : 
[Fri Nov 01 02:04:43.503957 2024] [proxy_fcgi:error] [pid 2749161:tid 140199325587200] [client 47.245.99.118:39340] AH01067: Failed to read FastCGI header
[Fri Nov 01 02:04:43.505955 2024] [proxy_fcgi:error] [pid 2749161:tid 140199325587200] (104)Connection reset by peer: [client 47.245.99.118:39340] AH01075: Error dispatching request to : 
[Fri Nov 01 02:04:46.836601 2024] [mpm_event:notice] [pid 2748829:tid 140200964168960] AH00491: caught SIGTERM, shutting down

I have already increase pm.max_children setting in PHP, start servers and spare servers number, but it did not solve the problem.

There is also SSL warnings, changes to .conf from example.com to localhost did not helped.

[Thu Oct 31 16:00:41.579532 2024] [ssl:warn] [pid 2748828:tid 140200964168960] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 31 16:00:41.581286 2024] [ssl:warn] [pid 2748828:tid 140200964168960] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 31 16:00:41.598212 2024] [ssl:warn] [pid 2748829:tid 140200964168960] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 31 16:00:41.598990 2024] [ssl:warn] [pid 2748829:tid 140200964168960] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

Currently, bitnami is a worst hosting for me, sorry guys

yeswordpress commented 2 weeks ago

Dear support, what's up with the problem? Are you going to help me?

jotamartos commented 2 weeks ago

Hi @yeswordpress,

I can see you are using a 512MB instance which performance is really poor. Please increase the resources of the VM to see if the issues are resolved

 [Fri Nov 01 07:41:42.291295 2024] [proxy_fcgi:error] [pid 2755431:tid
140395962951424] [client **ip_address**:60000] AH01071: Got error 'PHP message:
PHP Warning: Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php
on line 107; PHP message: PHP Warning: Undefined array key "HTTP_HOST" in
/bitnami/wordpress/wp-config.php on line 108'

I also suggest you take a look at the WordPress configuration to solve this error. Please note that PHP causes performance issues when logging too many messages in the log files.

There is also SSL warnings, changes to .conf from example.com to localhost did not helped.

The SSL warnings are due to you are using the dummy certs we include in the instance. If you change the certs with valid ones, you won't get that message anymore.

yeswordpress commented 2 weeks ago

Dear Juan José Martos, thanks a lot! We were desperate for reaching the support, so 3 days ago I tried to ask admin who made set up for instance if he could check avaiable RAM in instance and I was wondering why the 512 Mb instance was used. So we've moved to 2 Gb instance and things have went better.

But why after shutdown server did not try to reactivate automatically? What should we do to make it reactivate itself after shutdown due to lack of memory or another critical errors?

jotamartos commented 1 week ago

But why after shutdown server did not try to reactivate automatically? What should we do to make it reactivate itself after shutdown due to lack of memory or another critical errors?

There is a service called gonit that should be monitoring those services.

https://docs.bitnami.com/general/apps/wordpress/administration/configure-use-gonit/

If it couldn't restart the services, it was probably due to that performance issue I mentioned above. Please monitor and check if the service works as expected.