Re-opeining due to lack of resolution - WP CMS Nginx SSL refuses to respond with memory errors

Keywords: WordPress + NGINX + SSL - Google Cloud Platform - Technical issue - Other

bndiagnostic ID: aace01b7-becd-dbb3-2d5f-d74b2818a0e7

bndiagnostic output:

? Wordpress: Found possible issues
? Resources: Found possible issues
? Nginx: Found possible issues
? Php: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/understand-file-permissions/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/
https://docs.bitnami.com/installer/infrastructure/nginx/troubleshooting/
https://docs.bitnami.com/general/apps/akeneo/administration/increase-memory-limit/

bndiagnostic failure reason: The tool could not find any issue

Description:
WP CMS Nginx SSL refuses to respond with memory errors - case closed without resolution and well under 14 days of last response.
identical case closed without resolution as well - Wordpress keeps crashing due to lack of memory - #9 by jota

I am reopening this case because the prior case has been closed without resolution.
It is a great disservice and highly insensitive to close these cases with assumptions and no resolution and after spending so much time troubleshooting.
For my particular issue I created a case with Google and Bitnami to ensure that all ends are addressed.
By the time I had created this case, I had already upgraded the server to a n1-standard from g1-small and the issue persisted.
Without resolving the root case, adding additional CPUs or memory will not lead to a resolution. This was one of the recommendations forms he other case and very unhelpful at a minimum given all the details and information in the logs.
As with the other users, this is occurring on an instance that has no content, a new instance so the idea that plugins etc are cause this is far fetched - I have rebuilt this twice with the same outcome.
The last response for this case has not been over 14 days and it is being closed. All this does nto sit well. At a minimum, this is feedback that your image is not functional for users so it’s in everyone’s best interest to resolve this without assumptions.

ISSUE:
Periodically, the whole server becomes completely unresponsive. The only solution is to restart the Server as it down not even respond to SSH.

Requesting assistance on how to resolve.

WPCMS Nginx and Maria DB
The WP CMS theme that I am using is Uncode. The them requires the following server requirements which I are configured. https://support.undsgn.com/hc/en-us/articles/213453949

sudo tail -n 20 /opt/bitnami/wordpress/wp-content/debug.log
[12-Apr-2022 03:58:17 UTC] PHP Notice: Undefined property: stdClass::$plugin in /opt/bitnami/wordpress/wp-includes/class-wp-list-util.php on line 167
[12-Apr-2022 03:58:17 UTC] PHP Notice: Undefined property: stdClass::$plugin in /opt/bitnami/wordpress/wp-includes/class-wp-list-util.php on line 167
[12-Apr-2022 03:12:07 UTC] PHP Warning: Cannot modify header information - headers already sent in /bitnami/wordpress/wp-content/plugins/uncode-privacy/includes/class-uncode-toolkit-privacy-public.php on line 342
[1
[12-Apr-2022 00:15:14 UTC] PHP Fatal error: Out of memory (allocated 2097152) (tried to allocate 2377008 bytes) in /opt/bitnami/wordpress/wp-includes/wp-db.php on line 2162
[12-Apr-2022 00:15:14 UTC] PHP Fatal error: Out of memory (allocated 2097152) (tried to allocate 2377008 bytes) in /opt/bitnami/wordpress/wp-includes/wp-db.php on line 2162
[12-Apr-2022 00:16:25 UTC] PHP Warning: Cannot modify header information - headers already sent in /bitnami/wordpress/wp-content/plugins/uncode-privacy/includes/class-uncode-toolkit-privacy-public.php on line 342
[12-Apr-2022 00:16:25 UTC] PHP Warning: Cannot modify header information - headers already sent in /bitnami/wordpress/wp-content/plugins/uncode-privacy/includes/class-uncode-toolkit-privacy-public.php on line 342
[12-Apr-2022 00:16:44 UTC] PHP Warning: Cannot modify header information - headers already sent in /bitnami/wordpress/wp-content/plugins/uncode-privacy/includes/class-uncode-toolkit-privacy-public.php on line 342
[12-Apr-2022

wp-config.php define( ‘WP_MEMORY_LIMIT’, ‘512M’ ); define( ‘WP_DEBUG’, true );
// Enable Debug logging to the /wp-content/debug.log file
define( ‘WP_DEBUG_LOG’, true );
// Disable display of errors and warnings
define( ‘WP_DEBUG_DISPLAY’, false ); Fix: WordPress Memory Exhausted Error – Increase PHP Memory Fix: WordPress Memory Exhausted Error - Increase PHP Memory
Changes to php.ini nano /opt/bitnami/php/etc/php.ini memory_limit 512M max_input_vars 3000 max_execution_time 120 post_max_size 80M upload_max_filesize 124M allow_url_fopen ON asp_tags OFF — Not available in php.ini
I have added debugging and logging of error messages and the shows memory errors Restarted instance sudo /opt/bitnami/ctlscript.sh restart

Reviewed Modify The Memory Limit Modify the memory limit Memory limit is at 512 in all cases

/opt/bitnami/php/etc/memory.conf . Memory.conf is s below. If you recommend a change, I will need to know the exact values too change pm.max_children=60
pm.start_servers=40
pm.min_spare_servers=40
pm.max_spare_servers=45 pm.max_requests=5000 How can I address the errors below

[11-Apr-2022 22:32:11] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 39 idle, and 53 total children
[11-Apr-2022 22:32:12] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 39 idle, and 54 total children
[11-Apr-2022 22:32:13] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 55 total children
[11-Apr-2022 22:32:14] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 56 total children
[11-Apr-2022 22:32:15] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 57 total children
[11-Apr-2022 22:32:18] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 58 total children
[11-Apr-2022 22:32:21] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 59 total children
[11-Apr-2022 22:32:24] WARNING: [pool www] server reached pm.max_children setting (60), consider raising it
[11-Apr-2022 23:16:02] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 39 idle, and 48 total children
[11-Apr-2022 23:16:03] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 39 idle, and 49 total children
[11-Apr-2022 23:16:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 50 total children
[12-Apr-2022 00:14:35] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 39 idle, and 48 total children
[12-Apr-2022 00:21:50] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 39 idle, and 53 total children
[12-Apr-2022 00:21:51] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 39 idle, and 54 total children
[12-Apr-2022 00:21:52] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 55 total children
[12-Apr-2022 00:21:53] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 56 total children
[12-Apr-2022 00:21:55] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 57 total children
[12-Apr-2022 00:21:56] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 58 total children
[12-Apr-2022 00:21:57] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 39 idle, and 59 total children
[12-Apr-2022 00:21:58] WARNING: [pool www] server reached pm.max_children setting (60), consider raising it

Links reviewed without solution
Modifying PHP php_max_vars - #4 by gongomgra 1 Modifying PHP php_max_vars

Hi @codepantry ,

As I mentioned in the other ticket, the WordPress’ developers should provide more information about the number of processes you would need depending on the plugins and the requests you have. Did you contact them?

https://wordpress.org/support/

As I can see in the message you just posted, there are many warning errors related to the plugins you have and that reduces the performance for sure. Please contact WordPress or the developers of the plugin to get more info.

Keywords: WordPress + NGINX + SSL - Google Cloud Platform - Technical issue - Other

bndiagnostic ID: 3bcce6b1-ffb1-cd38-3643-ed22fa65745c

bndiagnostic output:

? Wordpress: Found possible issues
? Resources: Found possible issues
? Nginx: Found possible issues
? Php: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/understand-file-permissions/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/
https://docs.bitnami.com/installer/infrastructure/nginx/troubleshooting/
https://docs.bitnami.com/general/apps/akeneo/administration/increase-memory-limit/

bndiagnostic failure reason: The tool could not find any issue

Description:
Reopening cases closed without resolution
I am reopening this case fro the second time as it seems you are blocking ability of for me to reopen this case or not posting it to here.
I have support with Google and this is not within their domain and they point to Bitnami. I do not know the extent of support that Bitnami commits to when offering these free images however, I trusted that this would be a quicker way to deploying a WP CMS with Nginx in GCP but this is absolutely not the case. Posting this as a last resort given that the two prior cases have been closed without resolution.

To begin with there are two similar cases that are related to this that have been closed without resolution and before the 14 day period allowing case creators to respond and or ability to confirm that what has been suggested works or does not work so as to help future users.

The related cases are

  1. Wordpress keeps crashing due to lack of memory
    Wordpress keeps crashing due to lack of memory - #9 by jota
  2. WP CMS Nginx SSL refuses to respond with memory errors
    WP CMS Nginx SSL refuses to respond with memory errors - #3 by michiel

Secondly, closing these issues without a resolution is a great disservice and a lack of insensitivity to the time input troubleshooting these issues. It is just disrespectful. If Bitnami’s support offering is deficient then just don’t post free images in GCP or AWS.

I will address the suggested fixes.

  1. Upgrade the instance - I responded explaining that this is a new instance installed on or around April 12th, 2022
  2. Upgrade the machine - Prior to opening the case, I upgraded the machine from GCP small instance to an N1 instance that has a dedicated CPI and 4.75 GB of memory
  3. This is a Wordpress issue so contact Wordpress - As I explained in the comment, this issue occurs in a fresh install. As soon as the instance comes alive the memory utilization shoots to 85% of whatever memory is available. There are no customizations to the WP CMS instance or plugins etc etc As with the other users, this is occurring on an instance that has no content, a new instance so the idea that plugins etc are cause this is far fetched - I have rebuilt this twice with the same outcome.
  4. This could be bots - I have hidden the login page and hardened the WP CMS install with logging activated to view attempted logins and bot attempts and there are none.

Without resolving the root case, adding additional CPUs or memory will not lead to a resolution. Now based no the above, there are PHP FPM memory errors and given the immediate memory spike (confirm by executing “free”) this points to an OS and PHP FPM issue in the default Bitnami image so I will zone in on that.

Memory log file sudo tail -40 /opt/bitnami/php/logs/php-fpm.log

Here are my settings
nano /opt/bitnami/php/etc/memory.conf (Follow number of processes * 4 rule but always max this at 16 even if you have say 8 processes which would mean 32GB. pm.max_spare_servers cannot be greater than pm.max_children, this should help you to calculate the rest of your numbers accordingly.) My settings
pm = dynamic
pm.max_children=16
pm.start_servers=6
pm.min_spare_servers=4
pm.max_spare_servers=8
pm.max_requests=100

PHP MEMORY nano /opt/bitnami/php/lib/php.ini
; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 256M PHP: Runtime Configuration - Manual
max_execution_time = 120
max_input_time = 60

WP CMS config define(‘WP_MEMORY_LIMIT’, ‘256M’); Increasing the WordPress Memory Limit - WooCommerce
Therefore with PHP memory set to 256MB and max_children to 16, then I should have at least 256MB x 16 (4GB) of free RAM to allocate only for PHP.

After these settings, I performed load testing using siege. Your may need to install and configure the max connections to allow you to load test with say 2000 connections - a simple DDoS attack to see how your server reacts if it gets hit by a large number of users online. It will help you tune properly the PHP numbers.

But first restart for the changes to take sudo /opt/bitnami/ctlscript.sh restart
Then run siege/DDoS yourself
siege https://www.yourwebsite.com/ -c 2000 -d 30 -t 1M

** SIEGE 4.0.4
** Preparing 2000 concurrent users for battle.
The server is now under siege…[error] descriptor table full sock.c:133: Too many open files
[error] descriptor table full sock.c:133: Too many open files
[error] descriptor table full sock.c:133: Too many open files
[error] descriptor table full sock.c:133: Too many open files
[error] descriptor table full sock.c:133: Too many open files
[error] descriptor table full sock.c:133: Too many open files
[error] descriptor table full sock.c:133:
[alert] socket: read check timed out(30) sock.c:240: Connection timed out
[error] Failed to make an SSL connection: 5: Connection reset by peer
[error] SSL_write() failed (syscall)

Lifting the server siege…siege aborted due to excessive socket failure; you
can change the failure threshold in $HOME/.siegerc

Transactions: 669 hits
Availability: 29.85 %
Elapsed time: 59.95 secs
Data transferred: 41.04 MB
Response time: 19.60 secs
Transaction rate: 11.16 trans/sec
Throughput: 0.68 MB/sec
Concurrency: 218.68
Successful transactions: 669
Failed transactions: 1572
Longest transaction: 42.19
Shortest transaction: 0.00

As you can see above. Mine fails. Need perhaps directions rom here on how to best tune server and memory settings based on the scenario above.

Hi @codepantry,

Did you contact the WordPress support team? I already told you that several times.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.