Lucee 4.5 vs Lucee 5.0 sticky sessions

Hi Guys,

We have been working on upgrading Lucee 4.x to 5.x. We started by upgrading one of our 3 load balanced servers in our pool to Lucee 5.x and bought it back into the pool. All was working fine, but we realised that sticky CF sessions using the Memcached driver with Couchbase were being lost when a user is moved from a Lucee 4.x to 5.x server or vice versa. Still works fine if a user is moved from one 4.x server to the other.

Is there anything obvious between 4.x and 5.x which would cause issues in maintaining the sessions that we may not be aware of? Would this be a known incompatibility and we should expect to loose sessions?

These are the config details for lucee and Memcached on each server:

Lucee 4.x server

Version| Lucee final
Version Name| [Neo]
Release date|Apr 9, 2018
ColdFusion® compatibilty version||

OS|Windows Server 2012 (6.2) 64bit
Servlet Container|Apache Tomcat/8.0.24
Java|1.8.0_45 (Oracle Corporation) 64bit

Memcached driver: Available version (Code Name: memcached)

The cache settings on this server are set the same as the details given below for the lucee 5 server, which are all defaults. The cache connection verifies ok on both servers.

Lucee 5.x server

|Version Name|[Velvet]
|Release date|17-Sep-2018
|ColdFusion® compatibility version|2016.0.03.300357

OS|Windows Server 2012 (6.2) 64bit
Remote IP|
Host Name|
Servlet Container|Apache Tomcat/8.0.24
Java|1.8.0_45 (Oracle Corporation) 64bit

Memcached driver:

Installed version|
Available version|,
Type|Full Version
Release Date|21-Apr-2017

These are the cache settings for this server:

this.cache.connections["couchbase"] = { class: '' , bundleName: 'memcached.extension' , bundleVersion: '' , storage: true , custom: { "socket_timeout":"30", "initial_connections":"1", "alive_check":"true", "buffer_size":"1", "max_spare_connections":"32", "storage_format":"JSON", "socket_connect_to":"3", "min_spare_connections":"1", "maint_thread_sleep":"5", "failback":"true", "max_idle_time":"600", "max_busy_time":"30", "nagle_alg":"true", "failover":"true", "servers":"" } , default: '' };

Lucee 4 and 5 have significantly different implementations of the session cache serialization which is not compatible so far as I know. You’ll likely have issues trying to use session caching with side-by-side major versions of Lucee. In fact, Lucee has been known to change it between minor versions which can render the serialized objects in cache unusable.

What Ortus has done is stopped using the full-fledged session storage in many cases, and moved to using our cbstorages module for Coldbox to store all Session variables. Then we control the serialization mechanism and can upgrade Lucee without it being affected.