I have a batch job which needs to run as soon as the rules service starts. So there’s a constraint on T_EVENT which invokes that batch job.
Sometimes, but not always, that constraint throws an error:
<ure:entry host="az048vm3001:7222" time="2022-11-07 07:46:33" source="RulesEngine:1" severity="Error">
<ure:request request-id="0"></ure:request>
<uslng:messages app-interface="http" version="1.0">
<uslng:message msg-code="60508" msg-category="Frequent End User Msg" msg-type="Error" system-msg="yes" language="default">
An error occurred when performing the following RDBMS statement:
<uslng:param name="Statement">SELECT ''
FROM CEP_PCSRD.T_EVENT t1
WHERE (t1.EVENT = :1 AND t1.SESSION_ID = :2)</uslng:param>
<uslng:param name="Param2">(STARTUP,14482352E4823)
</uslng:param>
<uslng:param name="Reason">UNIQUE_KEY_REASON</uslng:param>
</uslng:message>
<uslng:message msg-code="931" msg-category="USoft Message" msg-type="Error" system-msg="yes" source="rdbms" language="default">
<uslng:context app-interface="http">
<uslng:execution-stack />
<uslng:record>
<uslng:painted-window-name />
<uslng:table-name>unknown table</uslng:table-name>
<uslng:defined-window-name>unknown window</uslng:defined-window-name>
<uslng:primary-key>unknown pk</uslng:primary-key>
</uslng:record>
</uslng:context>
RDBMS Error:
<uslng:param name="ErrorText">
<rdbms-message>
<rdbms-message>Server: Msg 1222, Level 51. State 16, Line 1
HResult of 0x80040e31 (-2147217871) returned
Error Source: Microsoft OLE DB Driver for SQL Server
Error Description: Lock request time out period exceeded.
(8)
SELECT ''
FROM CEP_PCSRD.T_EVENT t1
WHERE (t1.EVENT = :1 AND t1.SESSION_ID = :2)
(STARTUP,14482352E4823)
---------------
</rdbms-message>
</rdbms-message>
</uslng:param>
Please contact your Application Manager.
</uslng:message>
<uslng:message msg-code="853" msg-category="USoft Message" msg-type="Error" system-msg="yes" language="default">
Cursor error in script.
Failed to open select cursor for statement:
<uslng:param name="Statement">INVOKE EU_AGENT.INITIALISE
WITH
SELECT REPLACE(f.VALUE, '$'tempdir]', (INVOKE RULESENGINE.GETPROPERTY
WITH
SELECT 'USoftTempDir'
)), CONVERT(INTEGER,t.VALUE)
FROM APP_DEFAULT_VALUES f, APP_DEFAULT_VALUES t, APP_DEFAULT_VALUES p, T_EVENT
WHERE (1 = 1 AND f.NAME = 'EU_AGENTS_FILE' AND t.NAME = 'EU_AGENTS_TOP' AND p.NAME = 'EU_AGENTS_RS' AND p.VALUE = (INVOKE SYSTEM_INFO.GETSERVICENAME
))</uslng:param>
</uslng:message>
</uslng:messages>
</ure:entry>
This only occurs when the server is booted and the rules service Windows service starts. Restarting the rules service always fixes the issue.
Anyone have any idea what might cause this?
P.S. USoft 10.0.1I, SQL Server 2016SP2, Windows Server 2019 Datacenter.