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.


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


- memcache php module
- available memcached deamon


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:

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

6. Clear ini cache

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