504 error in wordpress installation

Keywords: WordPress - AWS - Technical issue - Other

bnsupport ID: 102c07a2-c198-22dc-7bd3-99ac1161650e

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Resources: Found possible issues
? Mysql: Found possible issues
? Php: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/
https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-mysql/
https://docs.bitnami.com/general/apps/wordpress/configuration/configure-phpfpm-processes/

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Description:
Much of the error report is beyond my understanding.
However, when I check pagespeed issues I can’t access the file. So that doesn’t help.
I’m just trying to run a simple website and I don’t understand why these configuration issues are occurring. I would appreciate some professional help.
Thanks,
K

Hi @kevin8

Thanks for using Bitnami WordPress!

I took a look at the report generated by the tool but did not find anything that really points to the 500 error. Hence, could you please execute the following commands and share their output?

$ free -m
$ sudo /opt/bitnami/ctlscript.sh status
$ sudo gonit status
$ sudo apachectl -t
$ sudo /opt/bitnami/ctlscript.sh restart

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thanks Jose,


Last login: Wed Sep  8 21:15:15 2021 from 60.240.72.78
bitnami@ip-172-31-28-245:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:            965         485         133         122         346         218
Swap:           634         332         301
bitnami@ip-172-31-28-245:~$
bitnami@ip-172-31-28-245:~$ sudo /opt/bitnami/ctlscript.sh status
php-fpm already running
apache already running
mysql already running
bitnami@ip-172-31-28-245:~$
bitnami@ip-172-31-28-245:~$ sudo gonit status

Uptime                         22h12m32s
Last Check                     2021-09-09 21:46:01.890703676 +0000 UTC m=+79920.490564523
Next Check                     2021-09-09 21:48:01.890703676 +0000 UTC m=+80040.490564523
Pid                            1410
Pid File                       /var/run/gonit.pid
Control File                   /etc/gonit/gonitrc
Socket File                    /var/run/gonit.sock
Log File                       /var/log/gonit.log
Process 'apache'
  status                                        Running
  pid                                              1091
  uptime                                      22h12m32s
  monitoring status                           monitored

Process 'mysql'
  status                                        Running
  pid                                              1026
  uptime                                      22h12m32s
  monitoring status                           monitored

Process 'php-fpm'
  status                                        Running
  pid                                              1084
  uptime                                      22h12m32s
  monitoring status                           monitored


bitnami@ip-172-31-28-245:~$ sudo apachectl -t
Syntax OK
bitnami@ip-172-31-28-245:~$ sudo /opt/bitnami/ctlscript.sh restart
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql  started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
bitnami@ip-172-31-28-245:~$


K

Hi @kevin8

It is strange indeed. The commands I shared say that your Apache server instance is running. However, I cannot connect to the IP associated with it that appears in the report. Is there any change that you executed the bnsupport tool in another instance different than the one the commands were executed?

Apart from that, I noticed a PHP error in your log:

[Mon Sep 06 02:04:38.310752 2021] [proxy_fcgi:error] [pid 29801:tid 139830696597248] [client XXX.XXX.XX.XX:7366] AH01071: Got error 'PHP message: PHP Warning:  unlink(/opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/elementor/css/global.css): No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/elementor/core/files/manager.php on line 116PHP message: PHP Warning:  unlink(/opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/elementor/css/post-169.css): No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/elementor/core/files/manager.php on line 116PHP message: PHP Warning:  unlink(/opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/elementor/css/post-1692.css): No such file or directory in
...

It might be related to one of your plugins. Let’s try to disable all plugins and see if that resolves your issue:

$ sudo wp plugin deactivate --all

After that, try accessing your Wordpress page again and see if the error persists.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thanks Jose,

That IP address is the private IP address of the instance.

The current public IP address is 13.211.128.235

The plugin is Elementor Page builder, I don’t understand why it produces a PHP error. I will uninstall the plugin and reinstall it and see if that resolves that particular issue.

The 504 error is inconsistent. It happens when I bulk update several plugins, in particular high load ones such as woocommerce (and of course, elementor). My only solution when that happens is to stop the instance and restart it (which results in a new IP address).

I’ll wait a day or two for several plugin updates to be required, remove and reinstall elementor and then run the updates, and then the bndiagnostic tool again and report back.

Meantime, I’m seeking out an AWS consultant to have a look at my overall architecture and advise.

Many thanks,

K