Path

ez projects / ngmemcachemutex


Netgen Memcache Mutex

UNIX name Owner Status Version Compatible with
ngmemcachemutex Ivo Lukač beta 1.0 4.1
This extension overrides eZMutex to use memcache instead of file locking.

About

Memcache Mutex extension overrides eZMutex to use memcache instead of file locking.

Additionaly it overrides eZRunCronjobs class to set longer expiry time for lock (2 * eZRunCronjobs_MaxScriptExecutionTime).

There is also a simple memcache stats view (/memcache/stats) which is showing a bit of information about your memcache instance (we used some code from projects.ez.no/lamemcache for this).

Could be helpful for web sites which have a lot off mutex files (slowing down apache access to mutex dir) and for web sites on cluster which share var folder on network shared device (causing flock() system call to be very slow).
Otherwise on normal web sites it will not have any significant impact.

Extension will fallback to file based mutex if memcached for some reason is not available.

Requirements

- memcache php module www.php.net/manual/en/book.memcache.php
- available memcached deamon memcached.org

Installation

1. Extract the ngmemcachemutex extension, and place it in the extensions folder.

2. Enable the extension in eZ Publish.
Do this by opening settings/override/site.ini.append.php and add in the [ExtensionSettings] block:
ActiveExtensions[]=ngmemcachemutex

3. Configure your memcached server and port in memcache.ini

4. Update the class autoloads by running the script twice:
php bin/php/ezpgenerateautoloads.php -o
php bin/php/ezpgenerateautoloads.php -e

5. In config.php enable kernel override
define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', true );

6. Clear ini cache

This project has no reviews yet. Be the first one to review it!