Site w/ HTTP delay, slow performance after moving f/ another EC2 to Bitnami AMI instance, not running PageSpeed Insights

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Other
bnsupport ID: 7207b065-e1df-7786-a1c8-6ba38e823725
Description:
We had the website on a dev stage EC2 instance, with a non-Bitnami AMI (centOS, WHM), and built a production stage instance with Bitnami LAMP Stack (bitnami-lampstack-7.4.16-0-linux-debian-10-x86_64-hvm-ebs-nami-cb6afd05-a3b2-4916-a3e6-bccd414f5f21). We’ve started with a t3a.medium instance, changed it to a c5a.large due to bad performance and yesterday changed it again to a c5a.xlarge.

With the first change into production stage, we’ve noticed a severe downgrade in performance that got a bit better after changing to a c5a.xlarge, but still with low speed/performance and the worst is that we are not able to run the website for tests on PageSpeed Insights or other page testing platforms because of the HTTP delay the page gets - above 16s to load.

Ex.: Lighthouse returns the error: FAILED_DOCUMENT_REQUEST

We need your help to find out what could be impacting the site performance and how to solve it if possible.

Sincerely

Hi guys, appreciate your help as soon as possible for you.
BUMP

Hi @devs,

The Apache error log shows the following error:

PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /opt/bitnami/apache/htdocs/vendor/laravel/framework/src/Illuminate/Database/Grammar.php on line 62 

Can you try increasing the memory limit?

https://docs.bitnami.com/installer/apps/akeneo/administration/increase-memory-limit/

Regards,
Michiel

Hello @michiel,

If you look a few lines below in the log you’ll see we had the same error even after having changed the memoery limit to 1024 MB; we currently have 2048 MB and no memory errors but the initial problem remains - extremely slow performance - even after that, with an enormous HTTP Delay and still unable to run the website through Google’s PageSpeed Insights.

Can you please share any other ideas?

Regards

Any help, anyone?
Would really appreciate it.

BUMP

We’ve also turned Varnish off so we could turn on Pagespeed.
Still, seing no changes in terms of performance :confused:

Hi @devs,

I just accessed your site ****atlantico.com and reproduced the issue. Let’s see if we can find more information about the issue in the MySQL’s and PHP’s log files. The Bitnami Support tool couldn’t get the info, can you run these commands in the terminal and share the output here?

sudo tail -n 30 /opt/bitnami/mysql/logs/mysqld.log
sudo tail -n 30 /opt/bitnami/php/logs/php-fpm.log

I can see that there are a lot of PHP-FPM processes in the machine and it’s probably reaching the limits.

Thanks

Hello @jota,

Here is the output from

sudo tail -n 30 /opt/bitnami/mysql/logs/mysqld.log
2021-06-21T08:54:11.331989Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.23).
2021-06-21T08:54:12.613978Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23)  Source distribution.
2021-06-21T08:54:33.170914Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 5301
2021-06-21T08:54:33.172280Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-06-21T08:54:33.172326Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-06-21T08:54:33.177390Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-06-21T08:54:33.677921Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-06-21T08:54:34.361120Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-06-21T08:54:34.460650Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-06-21T08:54:34.460800Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-06-21T08:54:34.476317Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.
2021-06-21T09:18:26.982253Z 57 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2021-06-21T09:18:26.985906Z 58 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2021-06-21T09:18:26.988228Z 59 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2021-06-21T09:28:47.764569Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.23).
2021-06-21T09:28:49.286842Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23)  Source distribution.
2021-06-21T09:29:01.591138Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 7284
2021-06-21T09:29:01.592430Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-06-21T09:29:01.592440Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2021-06-21T09:29:01.597488Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-06-21T09:29:02.670532Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-06-21T09:29:02.777599Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-06-21T09:29:02.859539Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-06-21T09:29:02.859690Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-06-21T09:29:02.875252Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.0.23'  socket: '/opt/bitnami/mysql/tmp/mysql.sock'  port: 3306  Source distribution.

And the ouput from

sudo tail -n 30 /opt/bitnami/php/logs/php-fpm.log
<empty>

Since there have been some changes to the config based on @michiel’s suggestions and some findings of our own, we have run the bnsupport tool again which we would ask for you to look at with the following ID: 00369e9f-756f-b3f7-8436-6d4560aaac68

One note, though - you’ll find some errors regarding “memory exhausted”: those were app-related and have since been fixed. No improvement to the main issue, however.

This is as automatically configured by the bitnami stack itself based on the instance. Could you kindly tell us what we should do in this regard?

Regards

Hi @devs,

as the current log file doesn’t show anything, let’s try to get the info of the previous log files

mkdir -p /tmp/old-php-logs
cd /tmp/old-php-logs
gunzip /opt/bitnami/php/logs/php-fpm.log-20210620.gz
tail -n 20 *.log

Can you post the content of this command?

sudo cat /opt/bitnami/php/etc/memory.conf

Thanks

Hi @jota and thanks for your reply.
Unfortunately, given our deadlines and not being able to get help or find the answer using Bitnami AMI in time, we’ve built another instance without Bitnami AMI, with a fresh installed LAMP stack.

Hello @devs,

We are sorry to hear that.

Please don’t hesitate to reach out to us if decide to try it again.

Regards

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