Maintenance Tasks

Last Updated: 11 Nov 2019

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.


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.

For more information on how to use the Trash feature, refer to the Trash manual.


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 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 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:

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 {
  rotate 16
  create 660 www-data www-data
    if [ -f /var/run/ ]; then
      /etc/init.d/apache restart > /dev/null
Debian and Apache2
/var/log/apache2/*.log {
  rotate 16
  create 660 www-data www-data
    if [ -f /var/run/ ]; then
      /etc/init.d/apache2 restart > /dev/null
/var/log/httpd/*log {
  /bin/kill -HUP `cat /var/run/ 2>/dev/null` 2> /dev/null || true


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

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


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

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/, you can set the amount of memory that Squiz Matrix uses:


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:


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

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