Maintenance Tasks

Last Updated: 17 Apr 2017

This chapter discusses tasks that you need to perform to run Squiz Matrix on your server, and how to improve the performance of your server.

Bookmarks

Trash

The Trash is similar to the trash functionality found in many operating systems. Items placed in the Trash are not deleted immediately, but remain in the Squiz Matrix system until the Trash is purged.

It is important to purge the Trash regularly since a build-up of items in the Trash can cause the system to slow down, and when you eventually purge the Trash it will take much longer.

To purge the Trash, simply right click on the Trash asset, and select Purge Trash. Select Yes from the Purge Trash list, and click Commit.

HIPOs

HIPO management is performed through the HIPO Herder screen, which is described in the Concepts manual.

HIPO jobs sometimes become detached from the process that started them, and never fully complete. However, an incomplete HIPO will not corrupt the system as HIPOs are run in database transactions. The HIPO Herder lists all such unclaimed HIPOs and allows you to manually delete them.

Make sure the HIPO has actually finished before you delete it; some HIPOs do take a long time to complete. Any HIPO that is showing 100% has completed successfully, but has failed to detach itself from the system and is safe to delete. In addition, any HIPO older than a few hours is also safe to delete.

Simply check the box next to the HIPO process and click Commit to delete it.

Server Maintenance

The following tasks should be performed to maintain your system:

System Log Files

Squiz Matrix maintains two log files in the directory /home/websites/squiz_matrix/data/private/logs, which can be used to help troubleshoot problems that may have occurred.These files are:

  • error.log: all PHP errors are logged in this file. This includes any system or database access errors that appear at the top of the user's screen within Squiz Matrix.
  • cron_errors.log: all cron job errors are logged in this file.
  • system.log: all Squiz Matrix generated messages are logged in this file. This includes the creation of new assets, attribute changes and configuration changes.
  • asset_cache.log: when the SQ_CONF_DEBUG configuration setting is enabled in the system's main.inc file, Squiz Matrix will log internal caching information in this file, specifically any internal cache objects that were not cleared correctly. This log is used for development purposes only.

    For more information on the SQ_CONF_DEBUG configuration setting, refer to the Annotated main.inc chapter in this manual.
  • search.log: all search queries and results for the Squiz Matrix Search Page are logged in this file.
  • funnelback.log: generated after reindexing the Funnelback Manager. This log file contains information on the funnelback engine and logs funnelback errors on the system.
  • performance.log: performance alerts are logged in this file. This includes when a listing asset, such as an Asset Listing Page, attempts to list over 1000 items on a single page. This log is used by system administrators to quickly determine any obvious performance issues on the system.

The location of the two log files can be changed in the main configuration file:
/home/websites/squiz_matrix/data/private/conf/main.inc

In addition, there are Apache log files, which are usually stored in the following directories:

  • Debian and Apache1 - /var/log/apache
  • Debian and Apache2 - /var/log/apache2
  • RHEL - /var/log/httpd

Log File Rotation

Apache logs and Squiz Matrix logs should be rotated at appropriate intervals, based on the growth rate of the logs, which depends on how busy the site is.

In general, Apache logs are usually rotated on a daily or weekly schedule, with old logs being compressed to reduce their on-disk size.

The unix utility logrotate is the most commonly used program and it is fairly straightforward to install and configure. In addition, the logrotate man file is comprehensive.

Following are examples logrotate configurations:.

Debian and Apache1
/var/log/apache/*.log {
  weekly
  missingok
  rotate 16
  compress
  delaycompress
  notifempty
  create 660 www-data www-data
  sharedscripts
  postrotate
    if [ -f /var/run/apache.pid ]; then
      /etc/init.d/apache restart > /dev/null
    fi
  endscript
Debian and Apache2
/var/log/apache2/*.log {
  weekly
  missingok
  rotate 16
  compress
  delaycompress
  notifempty
  create 660 www-data www-data
  sharedscripts
  postrotate
    if [ -f /var/run/apache2.pid ]; then
      /etc/init.d/apache2 restart > /dev/null
    fi
  endscript
RHEL
/var/log/httpd/*log {
  missingok
  compress
  notifempty
  sharedscripts
  postrotate
  /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
  endscript

PHP

Old PHP sessions are not always cleaned automatically, and you may want to periodically purge old session files, by setting up a cron job to run the script session_cleanup.sh.

Removing active session files will forcibly logout any user that is currently logged in.

Webstats

When installing a web statistics program, you will normally be required to add an entry to cron to initiate a collection and reporting run. These programs are often IO intensive, and can have a negative impact on the performance of your site.

It is recommended that you run accounting and statistical reporting programs at a time when your server is at its quietest (for example, between 2:30am and 3:30am).

File Change Detection Tool

You may wish to configure a file change detection tool for a number of reasons:

  1. To watch for any changes that you or your users may have made to the Squiz Matrix tree.
  2. To monitor temp and log directories for unusual entries.
  3. To ensure general system integrity.

Squiz recommends the use of AIDE. For more information, see http://aide.sourceforge.net/.

Performance Issues

The following areas can be looked at to increase the performance of your system:.

Increasing Memory Limit

If you find that you are getting errors indicating that the memory limit has been exceeded while performing certain intensive tasks (such as design parsing), you can increase the memory allocated to Squiz Matrix by modifying a Squiz Matrix source file. In the file /data/private/conf/main.inc, you can set the amount of memory that Squiz Matrix uses:

define('SQ_CONF_WEB_MEMORY_LIMIT', 64);
define('SQ_CONF_CRON_MEMORY_LIMIT', 64);

When changing this setting, it is recommended to change it in small increments of 32MB at a time to find an appropriate memory usage level. These memory limits can also be changed on the System Configuration screen. For more information,refer to the System Configuration manual.

Squiz Server

Squiz Server is a daemon process that operates separately from Squiz Matrix, and is used primarily for intensive processing tasks, most commonly HIPOs.

When a HIPO is ready to be processed, Squiz Matrix connects to Squiz Server, which then takes on the role of processing the task, thus avoiding the performance restrictions of being run inside a web browser.

Using Squiz Server for these tasks greatly speeds up any Squiz Matrix task, which requires HIPOs.

PHP Caching

PHP caching software keeps regularly accessed PHP scripts compiled in memory, and can greatly improve performance of Squiz Matrix.

Squiz Matrix has been tested using APC, but other solutions are available such as:

PostgreSQL

The default settings on installation of PostgreSQL generally will not give you optimal performance for your system as they are machine dependant. You should follow the tuning guidelines for your particular server. You can find information on tuning different servers at http://archives.postgresql.org/pgsql-performance/.

It is also recommended you regularly vacuum your database. Once the size of your database increases, a regular vacuum can offer noticeable performance increases. By default your system is configured to run the autovacuum script to do this automatically.


Previous Chapter Next Chapter

The Latest

Let Us Know What You Think

Let us know if you spot any errors or if you have any ideas on how we can improve the Matrix Community Website.

Contact Squiz for Demo

Let us show you the true power of Squiz Matrix by giving you a personalised demonstration.