WordPress Multisite Server Errors - Google Cloud

Keywords: WordPress Multisite - Google Cloud Platform - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 9d466f98-e801-bf8d-944d-33847b77d3ca
Description:
After putting on air a new instance of WordPress Multisite with the type of machine recommended by Bitnami (G1-Small) I can’t even upload a theme without receiving some error at least once. I’ve changed all WordPress memory entries and nothing solved. according to Cloudflare, in 30 days my site returned 11% of requests with some error. Does anyone have the same problem and know any solution or should I change machines?
Third time I create a G1-Small instance and all with the same problem.

Hi @giulianopires

Thanks for using Bitnami WordPress Multisite!

I can’t even upload a theme without receiving some error at least once. I’ve changed all WordPress memory entries and nothing solved.

I am sorry you are experiencing such behavior :frowning: I have tried to replicate it on my side and could not face any issues:

Third time I create a G1-Small instance and all with the same problem.

According to the bnsupport-tool, the problems you are experiencing are related to PHP trying to allocate more memory than the one available.

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

[Wordpress]

Found recent WordPress plugin related error messages in the Apache error log.

[Thu Jun 03 16:07:26.984768 2021] [proxy_fcgi:error] [pid 4790:tid 139921847219968] [client 172.68.26.98:33752] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 14680064) (tried to allocate 20480 bytes) in /bitnami/wordpress/wp-content/plugins/elementor-pro/modules/theme-builder/documents/archive.php on line 0', referer: https://XXXXXXX.design/links/

Please check the following guide to deactivate plugins:

https://developer.wordpress.org/cli/commands/plugin/deactivate/

[Apache]

Found recent error or warning messages in the Apache error log.

[Thu Jun 03 16:05:39.478656 2021] [proxy_fcgi:error] [pid 4790:tid 139922174371584] [client 172.68.26.98:29856] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 38912000) (tried to allocate 3661824 bytes) in /opt/bitnami/wordpress/wp-includes/script-loader.php on line 1942', referer: https://XXXXXXX.design/links/
 [Thu Jun 03 16:07:10.226768 2021] [proxy_fcgi:error] [pid 4790:tid 139921427781376] [client 172.68.26.98:21448] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 27262976) (tried to allocate 376832 bytes) in /opt/bitnami/wordpress/wp-includes/class-wp-customize-widgets.php on line 1051PHP message: PHP Fatal error: Out of memory (allocated 27262976) (tried to allocate 376832 bytes) in /opt/bitnami/wordpress/wp-includes/functions.php on line 4757', referer: https://XXXXXXX.design/links/
 [Thu Jun 03 16:07:41.536499 2021] [proxy_fcgi:error] [pid 4550:tid 139921956161280] [client 172.68.24.156:21114] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 8388608) (tried to allocate 20480 bytes) in /opt/bitnami/wordpress/wp-includes/wp-db.php on line 2023', referer: https://XXXXXXX.design/wp-admin/customize.php?url=https%3A%2F%2FXXXXXXX.design%2Flinks%2F

Please check the following guide to troubleshoot server issues:

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


Could you please share the configuration you are using for PHP? Let’s try to see if there is something out of place there

$ sudo ls -la /opt/bitnami/php/etc
$ sudo cat /opt/bitnami/php/etc/memory.conf
$ sudo tail -n 30 /opt/bitnami/php/logs/php-fpm.log

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

1 Like

Thanks for your reply @jcarmona.

sudo ls -la /opt/bitnami/php/etc:

total 264
drwxrwxr-x  5 root    root  4096 Jun  4 15:47 .
drwxr-xr-x 12 root    root  4096 May  7 11:50 ..
-rw-rw-r--  1 root    root    64 May  7 11:04 common.conf
drwxrwxr-x  2 root    root  4096 Jan  1  1970 conf.d
-rw-rw-r--  1 root    root    17 May  7 11:04 environment.conf
drwxr-xr-x  2 root    root  4096 May 28 05:29 memory
lrwxrwxrwx  1 root    root    24 Jun  1 18:21 memory.conf -> memory/memory-small.conf
-rw-rw-r--  1 root    root  1235 May  7 11:04 pear.conf
-rw-rw-r--  1 root    root  5404 May  7 11:04 php-fpm.conf
-rw-rw-r--  1 root    root  5387 May  7 11:04 php-fpm.conf.default
drwxrwxr-x  2 root    root  4096 May  7 11:50 php-fpm.d
-rw-rw-r--  1 bitnami root 73135 Jun  1 18:29 php.ini
-rw-rw-r--  1 root    root 72554 May  7 11:04 php.ini-development
-rw-rw-r--  1 root    root 72584 May  7 11:04 php.ini-production
sudo cat /opt/bitnami/php/etc/memory.conf:
; Bitnami memory configuration for PHP-FPM
;
; Note: This will be modified on server size changes

pm.max_children=30
pm.start_servers=20
pm.min_spare_servers=20
pm.max_spare_servers=22
pm.max_requests=5000
sudo tail -n 30 /opt/bitnami/php/logs/php-fpm.log:
[03-Jun-2021 06:42:00] WARNING: [pool www] server reached pm.max_children setting (30), consider raising it
[03-Jun-2021 06:44:44] WARNING: [pool www] server reached pm.max_children setting (30), consider raising it
[03-Jun-2021 14:53:31] WARNING: [pool www] child 3787 exited with code 1 after 358.315243 seconds from start
[03-Jun-2021 15:25:32] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 8 children, there are 17 idle, and 28 total children
[03-Jun-2021 15:25:33] WARNING: [pool www] server reached pm.max_children setting (30), consider raising it
[03-Jun-2021 15:59:24] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 8 children, there are 19 idle, and 25 total children
[03-Jun-2021 15:59:25] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 16 children, there are 19 idle, and 26 total children
[03-Jun-2021 15:59:26] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 32 children, there are 19 idle, and 27 total children
[03-Jun-2021 15:59:27] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 32 children, there are 19 idle, and 28 total children
[03-Jun-2021 15:59:28] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 32 children, there are 19 idle, and 29 total children
[03-Jun-2021 16:10:54] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 8 children, there are 19 idle, and 25 total children
[03-Jun-2021 16:10:57] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 16 children, there are 19 idle, and 26 total children
[03-Jun-2021 16:10:59] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 32 children, there are 19 idle, and 27 total children
[03-Jun-2021 16:11:00] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 32 children, there are 19 idle, and 28 total children
[03-Jun-2021 16:11:01] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 32 children, there are 19 idle, and 29 total children
[03-Jun-2021 16:11:03] WARNING: [pool www] server reached pm.max_children setting (30), consider raising it
[03-Jun-2021 22:18:16] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 8 children, there are 19 idle, and 25 total children
[03-Jun-2021 22:18:20] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 16 children, there are 19 idle, and 26 total children
[03-Jun-2021 22:27:07] WARNING: [pool www] server reached pm.max_children setting (30), consider raising it
[03-Jun-2021 22:57:51] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa
re_servers), spawning 8 children, there are 19 idle, and 25 total children
[03-Jun-2021 22:58:01] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spa

Hi @giulianopires

Based on the logs you provided and the report generated by the bnsupport-tool, my impression is that you are using a lot of plugins that require more system capabilities. The error logs constantly point to OutOfMemory errors, which means that the app tried to allocate more RAM than what it has:

[Thu Jun 03 16:05:39.478656 2021] [proxy_fcgi:error] [pid 4790:tid 139922174371584] [client 172.68.26.98:29856] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 38912000) (tried to allocate 3661824 bytes) in /opt/bitnami/wordpress/wp-includes/script-loader.php on line 1942', referer: https://XXXXXXX.design/links/
 [Thu Jun 03 16:07:10.226768 2021] [proxy_fcgi:error] [pid 4790:tid 139921427781376] [client 172.68.26.98:21448] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 27262976) (tried to allocate 376832 bytes) in /opt/bitnami/wordpress/wp-includes/class-wp-customize-widgets.php on line 1051PHP message: PHP Fatal error: Out of memory (allocated 27262976) (tried to allocate 376832 bytes) in /opt/bitnami/wordpress/wp-includes/functions.php on line 4757', referer: https://XXXXXXX.design/links/
 [Thu Jun 03 16:07:41.536499 2021] [proxy_fcgi:error] [pid 4550:tid 139921956161280] [client 172.68.24.156:21114] AH01071: Got error 'PHP message: PHP Fatal error: Out of memory (allocated 8388608) (tried to allocate 20480 bytes) in /opt/bitnami/wordpress/wp-includes/wp-db.php on line 2023', referer: https://XXXXXXX.design/wp-admin/customize.php?url=https%3A%2F%2FXXXXXXX.design%2Flinks%2F

I have noticed that you have several plugins, maybe an option could be to deactivate some of them:

-----------------------------------
Get the list of WordPress installed plugins
-----------------------------------
Output:

name,status,update,version
add-on-contact-form-7-mailpoet,inactive,none,1.3.16
contact-form-7,active,none,5.4.1
custom-twitter-feeds,active,none,1.8
dig_builder,inactive,none,0.9.6.5
dig_mergphne,inactive,none,1.6.1
digits,inactive,none,7.7.0.5
disable-admin-notices,active,none,1.2.6
elementor,active,none,3.2.4
elementor-pro,inactive,none,3.2.2
jetpack,active-network,none,9.8
loco-translate,inactive,none,2.5.2
login-designer,active-network,none,1.2.4
mailpoet,inactive,none,3.62.1
mailpoet-premium,inactive,none,3.62.0
permalink-manager-pro,active,none,2.2.9.9
qi-addons-for-elementor,active,none,1.2.2
qode-framework,active,none,1.1.3
really-simple-ssl,active,none,4.0.15
really-simple-ssl-pro,active,"version higher than expected",4.1.9
rebar,inactive,none,2.0.3
ripple-effect-background,active,none,1.0.0
wp-seopress-pro,inactive,none,4.7.0
revslider,active,none,6.4.11
instagram-feed,active,none,2.9.1
smoother,active-network,none,2.0.2
speaker,inactive,none,3.2.3
ungrabber,active-network,none,3.0.3
js_composer,inactive,none,6.6.0
wp-file-manager,active,none,7.1.1
wp-mail-smtp-pro,inactive,none,2.6.0
wpnotif,inactive,none,2.4.0.7
wp-phpmyadmin-extension,active-network,none,5.1.0.02
wp-rocket,inactive,none,3.9
wps-hide-login,active-network,none,1.8.5
duplicate-post,active-network,none,4.1.2
zermatt-core,active,none,1.0.2
sunrise.php,dropin,none,

Additionally, I have noticed that you have tuned the PHP options (such as max_execution_time, max_input_time, memory_limit, …). Bear in mind that these params do also have an impact on the behaviour of PHP applications. Increasing them while maintaining the specs and the number of active plugins can definitely lead to an OutOfMemory error.

Another option would be to launch a more capable server, that suits your needs. G1-Small do suit most people, but so do the default PHP options.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

1 Like

Managed to resolve unexpectedly in reality. When I created the instance, at the beginning I already increased the memory to 1024MB and so on.
Then she started having problems. So I created another one and just didn’t increase the memory to 512MB and that’s it. has worked perfectly.

Glad to see you were able to solve your issue! We are marking this topic as “Closed”.

If you have any other questions, please do not hesitate to let us know. Feel free to create a new topic referencing this one if necessary.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart: