ORM Error Cache is not alive (STATUS_SHUTDOWN)

Description

I've been seeing this intermittently in an application and have finally tracked down a reproducible test case. It seems to require the following conditions:

  • ORM Second Level Cache is enabled

  • EHCache is the Second level cache provider

  • At least one entity CFC has cacheuse attribute set

  • Two differently named applications share one ORM configuration and entity CFC which has cacheuse attribute set

The conditions to reproduce appear to be as follows:

  1. Initialize ORM on both App 1 and App 2

  2. Do reloadORM() on App 2 only

  3. Now both App 1 and App 2 fail with error "Cache is not alive (STATUS_SHUTDOWN)"

My internet searches on this error seem to indicate that under the covers Lucee may be setting the second Level cache specifically to the overall Lucee context, instead of the specific application name. So perhaps when one application resets ORM, it also instructs Hibernate/EHCache to reset it's cache. However it creates a problem because some part of this process is tied to the CFML application and some other part is tied to a higher level server context.

That is my theory. Test case to reproduce attached.

Environment

ORM Extension: 3.5.5.68
EHCache Extension: 2.10.0.27

OS Linux (4.9.60-linuxkit-aufs) 64bit
Remote IP 172.18.0.1
Host Name www.therapyappointment.local
Servlet Container Apache Tomcat/8.0.48
Java 1.8.0_151 (Oracle Corporation) 64bit
Architecture 64bit

Activity

Show:
Pothys - MitrahSoft
January 18, 2018, 11:03 AM

I've analyzed this ticket & confirmed the issue happened on latest version of lucee 5.2.6.29. I've tested with above test cases two different named application shared a same ORM config & entity. Load the ReloadORM() from one application & run another application, now the two application fails and throw error like "The Foo Cache is not alive (STATUS_SHUTDOWN)".

Seth Johnson
January 29, 2018, 9:44 PM

Thanks for getting this deployed! How do we go about updating to this version?

Thanks!

Cameron Childress
January 29, 2018, 9:50 PM

Very excited to see this!

Julian Halliwell
January 30, 2018, 12:41 PM

The 3.5.5.70 Hibernate Extension snapshot can be downloaded at http://download.lucee.org/?type=extsnap (instructions for installing at the top).

To update Lucee to 5.2.5.53 you can download the .lco file from http://download.lucee.org/?type=snapshots and add it to your lucee-server/patches directory.

Pothys - MitrahSoft
January 30, 2018, 1:37 PM

Hi ,

I've added test case for this ticket.

Pull Request: https://github.com/lucee/Lucee/pull/383

Fixed

Assignee

Michael Offner

Reporter

Cameron Childress

Priority

Major

Labels

Fix versions

Sprint

None

Affects versions

Configure