Epesi config.php memcached session settings
Your /data/config.php file contains a directive where to store sessions. Options are:
- file
- database
- memcache
Find a section that reads:
define('DIRECTION_RTL','0');
define('EPESI_URL','https://YourEpesiURL');
and find a line that defines how the sessions are handled:
Default: database driver
define('SESSION_TYPE','sql');
or
define("MEMCACHE_SESSION_SERVER","127.0.0.1:11211");
define('SESSION_TYPE','memcache');
or
define('SESSION_TYPE','file');
Memcached sessions are the fastest but you have to make sure Memcached deamon is running and you have PHP memcached extension enabled.
File sessions are the slowest, but easiest to setup.
For EpesiCRM on Windows via Uniserver the following settings are recommended:
// To improve performance
define('SESSION_TYPE','sql');
define("CACHE_COMMON_FILES",1);
If you experience errors in PHP with Epesi Directory, then add the following:
define('EPESI_DIR', '/');
While you are at that check if you have memache installed. Here is a simple script that not only checks for PHP extension, but actually does a test read/write to memcache database deamon:
<?php
$memcache = new Memcache;
$memcache->connect("localhost",11211); # You might need to set "localhost" to "127.0.0.1"
echo "Server's version: " . $memcache->getVersion() . "<br />\n";
$tmp_object = new stdClass;
$tmp_object->str_attr = "test";
$tmp_object->int_attr = 123;
$memcache->set("key",$tmp_object,false,10);
echo "Store data in the cache (data will expire in 10 seconds)<br />\n";
echo "Data from the cache:<br />\n";
var_dump($memcache->get("key"));
?>
Create a file called mctest.php and paste the above to run the test.
If you verify that memcache works - switch to it, this should give you the best performance and you will get fewer session lock errors.