Finally upgrading our forum, and need some help. (General)

by Joe I, Saturday, March 18, 2023, 18:15 (428 days ago)
edited by Joe I, Saturday, March 18, 2023, 18:41

Hi all. Please, whatever you do, don't laugh, cry, or yell after reading further!

We have been using MLF for over a decade on our site, but have (arrgh), sadly, never performed an upgrade. I've taken on the task to attempt to migrate whatever information is possible (within generous reason). Posts would be of greatest priority; everything else would be nice, but secondary.

We are currently at version 2.0.2.
I've installed the latest version (20220803.1) on a migration server, and (rightly or wrongly) assume that we don't want to attempt an upgrade in place.

Has anybody ever tackled such a project, or have any general or specific guidance on how to begin such an undertaking?

I am extremely comfortable with administration of SQL (including MySQL) databases. I'd also likely be comfortable coding whatever may be necessary here, but am mostly looking for feedback from people telling me I'm insane for attempting this. Or, better yet, a couple attaboys and some clue on where to begin.

Thanks, Joe

Avatar

Finally upgrading our forum, and need some help (with an update)

by Auge ⌂, Sunday, March 19, 2023, 19:13 (427 days ago) @ Joe I

Hello

We have been using MLF for over a decade on our site, but have (arrgh), sadly, never performed an upgrade.

Tststs, You are able until now to run the forum? Such an old version will at best run with PHP 5.x. Your hosting provider runs such an outdated PHP version? 😉 Anyway.

I've taken on the task to attempt to migrate whatever information is possible (within generous reason). Posts would be of greatest priority; everything else would be nice, but secondary.

We are currently at version 2.0.2.
I've installed the latest version (20220803.1) on a migration server, and (rightly or wrongly) assume that we don't want to attempt an upgrade in place.

Has anybody ever tackled such a project, or have any general or specific guidance on how to begin such an undertaking?

Ok, first things first. You can upgrade to the newest versions with a few interim steps.

1. Perform an update to version 2.3.5. This is directly possible, starting with version 2.0.2.
2. Afterwards perform an upgrade to version 2.4.24.

At this point you ar able to run the forum under PHP 7.4.

The last step is a bit tricky because we changed a few prerequisites but we didn't take attention to this change in the upgrade script. If you have e-mail-addresses, that are in use for more than one account, the upgrade will fail at the moment.

[edit]: If you are able to ensure that every e-mail-address in your userdata table is unique, an upgrade to 20220803.1 is possible.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Thanks Auge. This is great news.

by Joe I, Friday, March 24, 2023, 17:54 (422 days ago) @ Auge

Based on this, I will go with the upgrade process on a new instance, just to make sure everything goes smoothly. Here's what I've got from your notes:

1) Yes, current MLF version is 2.0.2. And yes amazingly, hosting plans (cpanel hosts at the very least) still allow use of PhP 5.6. It's not supported, but can still be used.
2) Port existing site and DB over to new instance. Update config/db_settings.php to reflect new DB settings.
2) Upgrade to 2.3.5.
3) Upgrade to 2.4.24.
4) Switch PhP version to 7.4.
5) I know that we have at least a few duplicate email addresses, so I will clean up the DB before proceeding.
6) Upgrade to 20220803.1 (2.5.4).
7) Switch PhP version to 8.0 / 8.1.

All necessary releases can be found at: https://github.com/My-Little-Forum/mylittleforum/releases

Our current version of MySQL is 5.6.51. The new instance MySQL version is 10.3.38. My understanding is that both versions should work through the upgrade process, but I'll perform the upgrade on the newer, 10.3.38, instance.
If I run into any issues with the last upgrade, I'll take another look at the "Problems with the upgrade procedure from 2.4.x to 2.5" thread.

I've had a heck of a time exporting the data from the existing instance / DB, as either the script or DB is timing out before the export is complete. The entries table has 500,000 records and only 300,000 records could be exported before the timeout. I've got a piecemeal solution we're going to attempt today that should work.


My one question at the moment: I thought I read on the forum that there was a problem with new DB tables that wasn't fixed until the upgrade script in 2.3.7 (and not 2.3.5). Is this anything I need to worry about, or will that simply get fixed with the upgrade FROM 2.3.5 to 2.4.24?

Avatar

Thanks Auge. This is great news.

by Auge ⌂, Saturday, March 25, 2023, 11:54 (421 days ago) @ Joe I

Hello

2) Port existing site and DB over to new instance. Update config/db_settings.php to reflect new DB settings.
2) Upgrade to 2.3.5.
3) Upgrade to 2.4.24.
4) Switch PHP version to 7.4.

Until here: nothing more than yes.

5) I know that we have at least a few duplicate email addresses, so I will clean up the DB before proceeding.

Yes, that is definitively necessary. I recommend to create a second backup of the current state after the check for doublettes for the case of a failing upgrade in the furter process steps.

6) Upgrade to 20220803.1 (2.5.4).

Yes.

7) Switch PhP version to 8.0 / 8.1.

Yes.

All necessary releases can be found at: https://github.com/My-Little-Forum/mylittleforum/releases

Our current version of MySQL is 5.6.51. The new instance MySQL version is 10.3.38.

MySQL 10.3.38 sounds like MariaDB. That has nothing to do with the PHP version and it should not be a problem.

My understanding is that both versions should work through the upgrade process, but I'll perform the upgrade on the newer, 10.3.38, instance.
If I run into any issues with the last upgrade, I'll take another look at the "Problems with the upgrade procedure from 2.4.x to 2.5" thread.

I recommend to ask here in your thread for help in a first step.

I've had a heck of a time exporting the data from the existing instance / DB, as either the script or DB is timing out before the export is complete. The entries table has 500,000 records and only 300,000 records could be exported before the timeout. I've got a piecemeal solution we're going to attempt today that should work.

Wow, 500,000 entries? That's a lot.

My one question at the moment: I thought I read on the forum that there was a problem with new DB tables that wasn't fixed until the upgrade script in 2.3.7 (and not 2.3.5).

There's nothing I am aware of. I inspected the update script for 2.4-versions [1], that starts with version 2.3.5 RC for an indicator for problems in the late 2.3-versions but I can't see one. Only a inconspicuous change in the settings table and a redefinition of one column in the userdata table.

Is this anything I need to worry about, or will that simply get fixed with the upgrade FROM 2.3.5 to 2.4.24?

I se no need to be afraid of the upgrade process to version 2.4.24. There are a plenty of people who upgraded to version 2.4.24 without any reports about serious problems.

Tschö, Auge

[1]: the location of the upgrade procedures from 2.3.5 to 2.3.7 in the upgrade script of version 2.3.7 and the same location in the upgrade script to version 2.4.24

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Thanks Auge. This is great news.

by Joe I, Saturday, March 25, 2023, 19:39 (421 days ago) @ Auge
edited by Joe I, Saturday, March 25, 2023, 20:09

OK, looks like we finally have a complete export of the database, so I can proceed with the forum port / upgrade.

5) I know that we have at least a few duplicate email addresses, so I will clean up the DB before proceeding.


Yes, that is definitively necessary. I recommend to create a second backup of the current state after the check for doublettes for the case of a failing upgrade in the furter process steps.

Yes, will definitely do this.
.
.
.

Our current version of MySQL is 5.6.51. The new instance MySQL version is 10.3.38.


MySQL 10.3.38 sounds like MariaDB. That has nothing to do with the PHP version and it should not be a problem.

Ah yes, it is MariaDB. Thanks for the note.
.
.
.

I've had a heck of a time exporting the data from the existing instance / DB, as either the script or DB is timing out before the export is complete. The entries table has 500,000 records and only 300,000 records could be exported before the timeout. I've got a piecemeal solution we're going to attempt today that should work.


Wow, 500,000 entries? That's a lot.

Yes, 494,000 entries. It is a lot, but we’ve never purged any records to date. Performance has suffered dramatically recently, so one of the drivers for the upgrade was, well, to get our forum current and see if we still have performance issues. I do notice 388,000 records in the entries_cache table. Might that be a concern here, and are there any notes on the purpose of the entries_cache table anywhere?

And for clarity, there are maybe 500 (most recent) posts which are actively viewed. The reminder are all for historical research purposes.


Thanks again for all your help.

Avatar

Thanks Auge. This is great news.

by Auge ⌂, Sunday, March 26, 2023, 17:45 (420 days ago) @ Joe I

Hello

5) I know that we have at least a few duplicate email addresses, so I will clean up the DB before proceeding.


Yes, that is definitively necessary. I recommend to create a second backup of the current state after the check for doublettes for the case of a failing upgrade in the furter process steps.

Yes, will definitely do this.

Even when it should – why ever – be impossible to upgrade to one of the latest versions (20220508.1 or newer), you would be able to install the version 2.4.24 and to restore the second backup because it has the correct structure.

Wow, 500,000 entries? That's a lot.

Yes, 494,000 entries. It is a lot, but we’ve never purged any records to date. Performance has suffered dramatically recently, so one of the drivers for the upgrade was, well, to get our forum current and see if we still have performance issues.

We changed a lot by creating database indexes for the columns, that are part of table joins and where clauses. The performance increased mentionable. But please do not expect the forum to load at rocket speed. There are still performance issues when reading database entries.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Great help.

by Joe I, Monday, March 27, 2023, 22:26 (419 days ago) @ Auge
edited by Joe I, Monday, March 27, 2023, 22:46

I've now completed a test upgrade to 20220803.1. The upgrade went fairly smoothly once I got a hang of the process and some cPanel File Manager limitations.

As you mention, 20220803.1 does appear to run significantly slower for us than even 2.0.2, on every page. Based on yours and Daniel's comments, I understand the DB changes from MyISAM to InnoDB, and the additional spam features added seem to be the primary culprits. Note that 2.4.24 provided the (significantly) best performance for us across all upgrade steps.

I'm going to take a look at the current DB structure a little more and see if anything stands out from a SQL performance perspective. The fact that performance is slow on every page, including Users / Admin / Forum Settings, etc, is a bit surprising here. I have tried running the site on PhP 7.4, 8.0, and 8.1, and haven't noticed much if any difference either.

Avatar

Great help.

by Auge ⌂, Tuesday, March 28, 2023, 07:37 (419 days ago) @ Joe I

Hello

I've now completed a test upgrade to 20220803.1. The upgrade went fairly smoothly once I got a hang of the process and some cPanel File Manager limitations.

What limitation did you encounter?

As you mention, 20220803.1 does appear to run significantly slower for us than even 2.0.2, on every page.

Wow, slower than 2.0.2. That's disappointing.

Based on yours and Daniel's comments, I understand the DB changes from MyISAM to InnoDB, and the additional spam features added seem to be the primary culprits. Note that 2.4.24 provided the (significantly) best performance for us across all upgrade steps.

Maybe it's a good idea to stay with version 2.4.24 for the production/real system.

I'm going to take a look at the current DB structure a little more and see if anything stands out from a SQL performance perspective. The fact that performance is slow on every page, including Users / Admin / Forum Settings, etc, is a bit surprising here.

Thank you for your effort. I hope, that, looking from different perspectives onto the issue, more eyes see more.

I have tried running the site on PhP 7.4, 8.0, and 8.1, and haven't noticed much if any difference either.

Regarding to the database connection performance issue I wouldn't expect the PHP version to have a great influence.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

RSS Feed of thread