Tuesday, November 24, 2009

JOOMLA / DOCMAN - Administration page slow performance problem


We encountered the following issue during an implementation for a customer's site.

Note: We run our Joomla! Site on a very lean Virtual Machine over CentOS. On a later date, if there appears to be interest on the subject, we may run an article with tips about this sort of setup, and the advantages to be derived from virtualization.

Let's confirm the issue is the same as ours by going through this checklist first:

  1. You have Joomla 1.5 (.15 in our case) with Docman (v. 1.4.0 stable) installed.
  2. You moved your Joomla server, by changing the server name or the server IP.
  3. Joomla front end site runs at normal speed, but administration site takes between 20 sec to 1 min or more to load the administration menus each time you reload the page.
  4. Icons for Docman links under the Components menu in the Administration console are not there anymore. Example below.

The reason behind this crazy problem is that DOCMAN, when installed, creates static (absolute) references in the database to the IP or the server name for the icons in the components menu. When the server is moved to a different IP address or a different server name the links to the icon images are broken, which causes the menu to take a painfully long time to load each time the administrator page is changed or refreshed.

The Proven Solution to this obscure problem:

1. Connect to your Joomla database (if you have phpmyadmin installed, you may run the query directly in there. For security reasons, we have chosen not to install phpmyadmin, and access MySQL through the command-line interface):
# mysql -u root -p
mysql> use joomladb
2. Verify and confirm that your links are broken by issuing the following query:
mysql> SELECT admin_menu_img FROM jos_components j where j.option = "com_docman";
3. Run the following update statement to modify the records in your database for Docman:
mysql> UPDATE jos_components j SET admin_menu_img = REPLACE(admin_menu_img, LEFT( admin_menu_img, INSTR( admin_menu_img,'components') - 1) ,"" ) WHERE j.option = "com_docman";
mysql> commit;
4. ... and welcome back performance!!! Now the components menu in the administration console should look something like this:



Hope this solves your performance problems, it did for us and our customers, and the backend of our Joomla! site is now lightning fast.


1 comment:

  1. And that is just one of the reasons I switched back to remository after many years: there's also this file that gets corrupted in DocMan some times, that will bring your entire site down and you have to make sure you have a copy of it to replace it. Bad stuff

    ReplyDelete