Migration issues (5.7-0 to 5.8.1-20)

Keywords: WordPress Multisite - AWS - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: 79f457e1-b97c-2283-7a9c-09c07518ff0e

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Wordpress: Found possible issues
? Resources: Found possible issues
? Php: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/
https://docs.bitnami.com/general/apps/akeneo/administration/increase-memory-limit/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
Hello,

We’ve had a few issues migrating stacks due to the fundamental changes of the stacks configs between versions.

1. PHP-FPM config files

We’ve tried to copy over our previous config for PHP (php.ini + fpm) however we’ve had to reconfigure the latest defaults as we cannot directly copy over the previous files. https://docs.bitnami.com/bch/apps/magento/configuration/configure-phpfpm-options/
The issue is our memory limits are being ignored for the workers. The current config we have is:

php.ini
memory_limit = 150M

/opt/bitnami/php/etc/php-fpm.d/www.conf
php_value[memory_limit]=150M

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

pm.max_children=15
pm.start_servers=5
pm.min_spare_servers=5
pm.max_spare_servers=10
pm.max_requests=500

2. MariaDB won’t disable fully

  • We’ve followed the steps here to disable mariaDB however errors still occur on system boot which stop gonit loading.
 sudo /opt/bitnami/ctlscript.sh status 
sudo mv /etc/monit/conf.d/mariadb.conf /etc/monit/conf.d/mariadb.conf.disabled 
sudo gonit reload 
sudo /opt/bitnami/ctlscript.sh status```

here is the logs in relation to mariadb on startup

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: 2021-10-16T12:20:33.072Z - info: Performing service start operation for mariadb

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: bash: /opt/bitnami/scripts/mariadb/start.sh: No such file or directory

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: 2021-10-16T12:20:33.264Z - error: Unable to perform start operation Export start for mariadb failed with exit code 127

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: ## 2021-10-16 12:20:33+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010_bitnami_agent_extra...

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: ## 2021-10-16 12:20:33+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami_agent...

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: ## 2021-10-16 12:20:33+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_update_welcome_file...

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: ## 2021-10-16 12:20:33+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040_bitnami_credentials_file...

Oct 16 12:20:33 ip-172-31-21-36 bitnami[11363]: ## 2021-10-16 12:20:33+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_clean_metadata...

Oct 16 12:20:33 ip-172-31-21-36 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE

-- Subject: Unit process exited

-- Defined-By: systemd

-- Support: https://www.debian.org/support

--

-- An ExecStart= process belonging to unit bitnami.service has exited.

--

-- The process' exit code is 'exited' and its exit status is 1.

Oct 16 12:20:33 ip-172-31-21-36 systemd[1]: bitnami.service: Failed with result 'exit-code'.

-- Subject: Unit failed

-- Defined-By: systemd

-- Support: https://www.debian.org/support

--

-- The unit bitnami.service has entered the 'failed' state with result 'exit-code'.

Oct 16 12:20:33 ip-172-31-21-36 systemd[1]: Failed to start LSB: bitnami init script.

-- Subject: A start job for unit bitnami.service has failed

-- Defined-By: systemd

-- Support: https://www.debian.org/support

--

-- A start job for unit bitnami.service has finished with a failure.

--

-- The job identifier is 381 and the job result is failed.

Oct 16 12:20:33 ip-172-31-21-36 sudo[11354]: pam_unix(sudo:session): session closed for user root

We’re also now getting these errors (Looks like the 200MB PHP has now been set)

AH01071: Got error ‘PHP message: PHP Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to allocate 4194312 bytes) in /opt/bitnami/wordpress/wp-includes/wp-db.php on line 2726’, referer:

We’ve previously used the following PHP FPM config and never had this error before. All memory limits are 200MB.

When checking the PHP-FPM workers they’re only using around 80/90MB each and the server has 2GB of RAM free.

Hi @dev8,

To migrate WordPress Multisite you need to use a plugin like the “All in one migration”

plugin.https://servmask.com/products/multisite-extension?locale=en

Regards,
Michiel

Hello,

We’ve been migrating manually without any issues until the recent stack changes. The DB is hosted on RDS etc.

So this plugin is not needed. Just need to resolve the new PHP-FPM config issues.

Kind Regards

The plugin also does not reconfigure any of the needed changes to the underlying stack.

Hi @dev8,

Do you have the memory limit set in any other file? Can you check?

cd /opt/bitnami/php
grep -R "memory_limit" .
cd /opt/bitnami/apache
grep -R "php_value memory_limit" 

Regards,
Michiel

The new server ram out of memory again. Will be posting details shortly.

There is also an issue on reboot of, relating to the MariaDB not being able to be disabled.

bitnami@ip-172-31-21-36:~$ sudo /opt/bitnami/ctlscript.sh status

Cannot find any running daemon to contact. If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)

bitnami@ip-172-31-21-36:~$ sudo head -n10 /var/log/gonit.log

time=“2021-10-15T21:54:16Z” level=info msg=“Performing checks”

time=“2021-10-15T21:54:16Z” level=info msg=“Performing process check php-fpm”

time=“2021-10-15T21:54:16Z” level=info msg=“Performing process check apache”

time=“2021-10-15T21:54:16Z” level=info msg=“Performing process check mariadb”

time=“2021-10-15T21:56:16Z” level=info msg=“Performing checks”

time=“2021-10-15T21:56:16Z” level=info msg=“Performing process check php-fpm”

time=“2021-10-15T21:56:16Z” level=info msg=“Performing process check apache”

time=“2021-10-15T21:56:16Z” level=info msg=“Performing process check mariadb”

time=“2021-10-15T21:58:16Z” level=info msg=“Performing checks”

time=“2021-10-15T21:58:16Z” level=info msg=“Performing process check php-fpm”

Any idea how to fix the startup / MariaDB issue?

Hi @dev8,

Can you tell me the output of the following command:

ls -la /opt/bitnami/scripts/mariadb/

Can you check if the scripts there mention the mariadb/start.sh script? If so, please comment them out.

Regards,
Michiel

So it was renamed to mariadb-bck.old and so was mariadb-env.sh.old.bck based on another post in the forum on how to disable it.

Postpack does:

cat postunpack.sh | grep start.sh

generate_monit_conf “mariadb” “$DB_PID_FILE” /opt/bitnami/scripts/mariadb/start.sh /opt/bitnami/scripts/mariadb/stop.sh

Within /etc/monit/conf.d/

the gotinit config for mariadb has been disabled

mariadb.conf.disabled

That being said … have another error:

sudo gonit reload

Cannot find any running daemon to contact. If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)

Hi @dev8,

Can you try the solution proposed here:

Regards,

Michiel

Hello, this doesn’t resolve the gonit issue.

We’re using apache+php but have disabled Mariadb.

Hi @dev8,

Can you run the bndiagnostic tool again so I can check the latest logs?

Regards,
Michiel

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