Monday, November 21, 2022

when all links from the server are not loading any page

 

cd /etc/apache2
sudo gedit apache2.conf 
 

Here in apache2.conf change

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

to

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 

sudo a2enmod rewrite

 sudo systemctl restart apache2

 

References:

https://stackoverflow.com/questions/18853066/404-not-found-the-requested-url-was-not-found-on-this-server

 

Thursday, November 10, 2022

Fix Apache proxfy_fcgi - Error dispatching request to

To check for logs:

                               cd /opt/bitnami/php/var/log 

                               sudo nano php-fpm.log

To change configuration 

                          sudo nano /opt/bitnami/php/etc/bitnami/common.conf

change 
pm.max_children = 8;   //changed from 5 to 8
pm.start_servers=half of pm.max_spare_servers
pm=ondemand        //created new line
pm.max_children=300
pm.start_servers=20
pm.min_spare_servers=5
pm.max_spare_servers=40
pm.max_requests=500 //changed from 5000 to 500
 
sudo /opt/bitnami/ctlscript.sh restart apache
sudo /opt/bitnami/ctlscript.sh restart php-fpm 

To check how many mb used at a time:

ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | grep php-fpm
 
 
 
  Reference:
https://stackoverflow.com/questions/25097179/warning-pool-www-seems-busy-you-may-need-to-increase-pm-start-servers-or-pm 
https://serverfault.com/questions/863238/check-an-average-memory-usage-by-single-php-fpm-process 
https://vincentteyssier.medium.com/optimizing-magento2-php-fpm-configuration-parameters-e1da16173e1c 
https://docs.bitnami.com/aws/apps/magento/configuration/configure-phpfpm-processes/