This article is also available in our new Knowledge Base: Sessions Not Working After Enabling Session Clustering
Applies To:
Zend Server running in Cluster Mode
Session Clustering
Admin UI
Summary
Once enabling Session Clustering from the Admin UI, sessions are being generated with the new format (master-port-backup-port-version-hash).
However those sessions are not being retrieved from Session Clustering Storage.
We found out that after initially enabling Session Clustering from the Admin UI, any usage of alternative session.save_handler will break this flow from running again. Once enabling Session Clustering the second time (for example, switching from "files" or "memcache" or "mysql") sessions functionality will be broken with the PHP applications.
Technical
The problem is that the Admin UI only switches session.save_handler in php.ini, and not getting to set Zend Session Service (SCD) configuration as well.
To remedy the situation, use one of the two following methods.
Method 1: Manual Fix
1. Backup, then edit /usr/local/zend/etc/scd.ini on all the cluster nodes, make sure you have "zend_sc.daemon.enable=1".
2. Restart SCD:
From console: sudo /usr/local/zend/bin/zendctl.sh restart-scd
From UI: Administration -> Components -> Zend Session Clustering -> Click the right circle which says "Restart daemon"
Method 2: Using CLI Tools
1. Run cluster wide config change (define target first):
2. Restart SCD across the cluster nodes:
Notes
- For introduction to CLI tools, please see this KB:
Quick Start For Using CLI Tools To Automate Zend Server (Single / Cluster) - We have an open bug for future version
Comments