The following line of code - within a function, of course - resulted in the error “failed to stop thread”.
var questionsArray=entityLoad("ExtendedQuestuions", stQuestionParameters, "questionIndex ASC");
Error details attached.
Do you happen to know why? We expect the entityLoad to last just a couple of seconds.
We would be grateful for any tips on how to avoid or solve the problem.
exception.log (5.5 KB)
requesttimeout.log (10.3 KB)
@BK_BK Looks like mostly related to LDEV-3659 Transactions with mixture of ORM and vanilla SQL do not complete.
Do you use entityLoad() and database query (cfquery or queryExecute) within the same transaction?
Please always mention your lucee version and for your issue please mention Hibernate extension version.
@cfmitrah , Thanks for your reply and suggestion.
I have duly checked the code. No, entityLoad() and database query are not used within the same transaction.
We’re on Lucee 184.108.40.206 (running on CommandBox) and our Hibernate extension version is 220.127.116.11.
I should mention that the following scenario is possible in our Lucee application:
simultaneous requests - some combining ORM calls with queryExecute within the same page context - connecting to the same database.
In fact, as I write this, we’re experiencing not only hung requests, but also threaddeath. Even without us using transactions.
I have also noticed something else with regard to the “failed to stop thread” error. Namely that most of the errors occur in pairs. First, an error caused by a system application called “controller”, followed a couple of seconds later by an error caused by a system application called “thread”. See attached requesttimeout log.
_requesttimeout.log (43.1 KB)
A further update. We thought we had deleted every transaction. However, a colleague has just discovered the following snippet of code in a CFC somewhere else in the same application
From what we can see there is no direct interaction between this CFC and the ones causing the error. Or, might the error be caused by indirect interaction between requests and the database?
@BK_BK sorry for the late response.
Hope this issue was solved in the lucee hibernate version 18.104.22.168 or 3.5.587-SNASPHOT.
So can please you ensure the locking issue happens in the latest hibernate 3.5.5 version(note 5.4 still the issue exists)?
In addition, once the locking happened then we must have to restart the SQL server. Otherwise, that locking will occur on all the operations in that particular table.
Thank you, @cfmitrah.
We shall check whether the issue exists in the latest version of Hibernate 3.5.5.x. We shall also follow your advice to restart the SQL server.
We’re still busy with this. Two questions have arisen in our team.
We’re now on Lucee 22.214.171.124-SNAPSHOT on CommandBox, with Hibernate extension version 126.96.36.199. From what we can see, that is the latest stable version. Currently, the newest versions are either 188.8.131.52-SNAPSHOT or 184.108.40.206-BETA. Is it OK to use either on a production server? If so, which would you recommend?
You mentioned restarting the SQL server. Could you please let us know why that matters? We need a reason to convince our server admin. The SQL server is never restarted, unless when there are system updates.