Weird writeLog issue

We have some writeLog commands that have no attributes.
writeLog("My Message here");

I would have loved to give you a stack trace and the real error message - but I cannot duplicate it any longer.

The error message was something along the lines of not being able to serialize a stream
And the effect was that there ended up being a JAVA HEAP out of memory error.
And after this - the application would just not work at all.
ALL requests timed out - but with nginx errors - not tomcat / luccee request timeouts.
no further messages were entered into any log.
running an `applicationStop()’ to restart the application had no effect - it timed-out, too.
The tomcat service needed to be restarted to see the application working again.

The ONLY change in the offending CFCs is the removal of the writeLog commands (from when it wasn’t working - to now).
(the change was either remove it completely - or I added in the TYPE / FILE and TEXT attributes)

However, putting them back into the code (reverting to the seemingly problematic version of our code) - to confirm this was the cause of the actual error, no longer sees the original error occurring.

So now I am left wondering was that really my problem at all?
Is there some weird issue in Logging?
Perhaps if the code is under XXX circumstance compared to YYY sees the result being different?

So as much as this is;
“I think I have found an issue in writeLog”

It’s also a "Can you think of anything I can do - in way of writing some tests - that would exercise a writeLog command without any attributes - to run differently?
Initially I am thinking -

Within an ORM transaction -
In a CFM template
In a CFM template as part of a function
In a CFC as pseudo-constructor
In a CFC , in a function
Within a read lock
Within an exclusive lock

(And I have tried all these and they all pass - I can no longer duplicate the error.)

Any other thoughts?
Thanks!

Don’t forget to tell us about your stack!

OS: Amazon Linux 2 (CentOS7)
Java Version: 11
Tomcat Version: 8
Lucee Version: 5.3.10.97

Is SELINUX enabled?
Check it, with:
sestatus
If its enabled temporarily disable it with:
setenforce 0

restart lucee
re-add the offending code

if it continues
Check permissions user is lucee service running as
Check permissions service user lucee.user have to your application path
Check if the problem occurs when you run lucee server as root

Check /var/log/messages
Check /var/log/secure