During restart of a Lucee instance, what might cause thread interruption, eventually leading to thread-death?

On a number of occasions one or other of the following exceptions occurred during the restart of a Lucee instance. As a result the instance fails to start. After one or more restart attempts the instance eventually starts. It then works normally throughout the day.

“ERROR”,“Thread-116”,“01/08/2023”,“02:54:37”,“session storage”,"Unable to install, thread interrupted.
lucee.runtime.exp.NativeException: Unable to install, thread interrupted.

“ERROR”,“Thread-6864”,“01/04/2023”,“09:25:58”,“client storage”,"Unable to acquire the global lock to install the bundle.
lucee.runtime.exp.NativeException: Unable to acquire the global lock to install the bundle.

“ERROR”,“Thread-6864”,“01/04/2023”,“09:25:58”,“scope-context”,"Unable to acquire the global lock to install the bundle.
lucee.runtime.exp.NativeException: Unable to acquire the global lock to install the bundle.

See attached scope.log

I am posting here because I wonder whether there is a bug. The reasons:

  1. Not just one particular instance is involved. This has occurred randomly on different instances.
  2. Each time, the stacktrace mentions the same datasource-related driver.
  3. The variations on the first line are around one and the same theme: scope.

Do you have any suggestions or ideas?

Lucee 5-3-9-163-SNAPSHOT

scope.log (642.6 KB)

reckon that’s the background controller thread (runs every minute) overlapping with the restart, so it’s trying to clear database sessions while restarting.

are you doing a cold restart or just restarting the context?

I’ve seen similar problems happen with complex/heavy applications which take a long time to startup

Thanks, @Zackster .
We do a cold restart, via CommandBox.

Do you have any idea how we can avoid multiple restart attempts? It can take 3, sometimes 4, attempts to restart.

how long does it take to startup in dev, without any traffic?

this is my proposed solution [LDEV-3368] - Lucee

Without any traffic, restarting usually takes a minute.
Sorry, I don’t quite understand the proposed solution in [LDEV-3368] - Lucee . How do I configure a one-minute delay for the controller thread during restart?

eh, it’s a proposed underlying system change, only start the background controller thread (or processing once lucee has fully deployed.

There has been some work done since the latest release to improved the speed of config deployment, can you try the latest 5.3.10.118 snapshot?

Ah, I get it. Thanks.

We have been testing 5.3.10.97 Stable and were looking to roll it out to all instances. Would that help?

If not, then I shall put it to our team to skip 5.3.10.97 and try the latest 5.3.10.118 snapshot instead.

i’d go with 5.3.10.118, it’s going RC2 soon and it has the fixes which might help

1 Like

Noted. Thanks.