Subject: Upgrade issue from 1.8.2 to 2.1.0. Slow load of homepage. [SOLVED]

Posted on: 10/06/15 05:30pm
By: joelbarrios

After several days of testing and no sleeping and a brand new template donated by Koalasoft, I finally upgraded a test site from 1.8.2 to 2.1.0. Was worst than uprading from 1.4.x to 1.8.x, but worked.

My receipe:

- Disabled ALL plugins and deleted ALL blocks creted by plugins.
- Removed ALL unused tables and the gl_topic_assignments table from a failed upgrade.
- Removed every plugin I do not use (calendar, spamx and xmlsitemap).
- Updating forum had its trick but worked: disable 2.8 before upgrade to Geeklog 2.1.0 and do not enable back until Forum 2.9 is installed in filesystem, then upgrade plugin.

Everything works excelent except one single but critical issue: the homepage takes a lot to load. Between 45 and 55 seconds to render. Any other parts of the website loads between 0.33 0.25 seconds and sometimes even less. To clarify: only happens with the homepage (http://foo/). Anything else loads really fast.

PHP 5.4.41 and MariaDB 5.5.41.
Database has been converted to innodb lots of releases ago.
All tables are optimized.
Database backups are ~50 MB.
8 years old database has 5300 registered users, over 6000 articles and 300 staticpages.
Tested disabling all plugins and removing contents and blocks from homepage, but same issue persists.
Already tested with denim, modern_curve and professional templates. Same issue.
No errors logged in error.log.
Tested with and without template cache.

Only the homepage takes a lot to load. Almost a minute in a test machine. Takes 35 to 40 seconds in the production server (2.1 GHz Quadcore Xeon CPU with 32 GB RAM). I can't ugrade the production website until I solve this issue. It's the only issue I have.

Any clues?

Re: Upgrade issue from 1.8.2 to 2.1.0. Slow load of homepage.

Posted on: 10/06/15 08:49pm
By: joelbarrios

I have solved it myself!

Made a fresh install and then compare gl_stories table between new database and upgraded one.

The fresh install had the following in the gl_stories table:

PHP Formatted Code
`text_version` tinyint(2) unsigned NOT NULL DEFAULT '1',

The upgraded database had the following:

PHP Formatted Code
`text_version` tinyint(2) NOT NULL DEFAULT '1',

So, the trick was to alter the filed and add unsigned and magically everything works wonderful now. Instead of a minute, it took only 1.85 seconds in the test server. 30 times better just because a small change in the database.

I'm going to do more testing before upgrading my production website, but I think it's very relevant that this small omision during the upgrade makes things really awful. Where should I properly post this bug?

Re: Upgrade issue from 1.8.2 to 2.1.0. Slow load of homepage. [SOLVED]

Posted on: 10/06/15 09:22pm
By: joelbarrios

I'm posting the diferences between a upgraded Geeklog database from 1.8.2 to 2.1.0.

The table prefix is not the one I use neither for testing or production.

No private values are being posted.

There are some small but significant changes to some columns that are not properly made by upgrade script. The change I made to my test database to solve the slowness issue is not documented here. Please read my previuos message from this topic.

I was not able to post the code here. Conection was reinitilized each time I tried.

Geeklog - Forum