Lucee 7 RAM drive disappears

I’m testing our application under Lucee 7.0.2.83-RC and I’m having issues using the RAM: drive.

We use the RAM drive for image manipulation, which historically was the most efficient method when we need to modify an image.

What I’m finding is in Lucee 7 the RAM drive can suddenly disappear. It will be there initially, but once the server has been thrown enough load, our unit tests that we running when the server first started up, start failing with error messages like:

Failed to write to file [ram:///temp.png], caused by [can’t write file [ram:///temp.png] as a file, missing parent directory [ram://]]

The stacktrace starts off:

lucee.runtime.exp.NativeException: can't write file [ram:///eicarVirus.txt] as a file, missing parent directory [ram://]
	at lucee.commons.io.res.util.ResourceUtil.checkGetOutputStreamOK(ResourceUtil.java:1547)
	at lucee.commons.io.res.type.cache.CacheResource.getOutputStream(CacheResource.java:274)
	at lucee.runtime.functions.file.FileStreamWrapperWrite._getOS(FileStreamWrapperWrite.java:138)
	at lucee.runtime.functions.file.FileStreamWrapperWrite.write(FileStreamWrapperWrite.java:69)
	at lucee.runtime.functions.file.FileWrite.call(FileWrite.java:65)
	at lucee.runtime.functions.file.FileWrite.call(FileWrite.java:39)

Once the RAM drive disappears, it does not seem to come back until after Lucee has restarted. This seems to be the same problem previously reported here:

But we have never seen this behavior in Lucee 5.4.x.

Here’s my environment:

OS: Oracle Linux 9.7
Java Version: OpenJDK 25
Tomcat Version: 11.0.18
Lucee Version: 7.0.2.83-RC

I’ve not been able to find anything in the logs which indicate a root problem.

Any thoughts on what might be happening?

Could this have something to do with the recent class loader changes?

From my understand (which definitely could be wrong), Lucee 7 will dynamically replace the class loader being used with a new instance in order to try to resolve memory leak issues. Is it possible the RAM drive is “disappearing” because of this change?