On Mar 10, 2004, at 9:53 AM, Aparajita Fishman wrote:
I have a client who has had random freezes, but they have now isolated it to 4D itself. It seems to have something to do with triggers.
Is that me? Yes, we had random freezes a while ago that we initially blamed on Active4D, but it turned out to be something else entirely:
We were using 4D Internet Commands from inside a trigger. 4D Internet Commands are synchronous and do not yield to the scheduler. Triggers execute on the server. Ergo: when the server executed the trigger, everybody would have to wait until the trigger finished executing before they could proceed. To aggravate the problem, the 4D Internet Commands we were issuing initiated database activity on a remote computer, which would also have to wait until the trigger finished executing. However, the trigger wouldn't finish until either the remote computer finished its database activity or it timed out. Thus, our database was in deadlock until 4DIC timed out. Oddly, the deadlock was also consuming as much CPU time as it could get.
In addition, since the server's UI thread wasn't responding [cf: doom, beachball of] we couldn't tell which 4D process was consuming the CPU time; OS-level tools [top, Process Viewer] would only say it was 4D Server. By the time the UI thread came back from vacation, the offending process was nowhere to be found.
- D
-- Alas! The onion you are eating is someone else's water lily. Lucky numbers 7, 14, 21, 22, 32, 45
