Announcements
I have an import that uses eConnect to import changes to an order. In the past 6 months we have had a couple of instances where the task running this scheduled import timeouts and quits. I am wondering if what is happening is that a user is in GP editing an order that is in the import file. What would eConnect do? Would it continue on with the other imports or would it sit and wait for the user to exit the order? Is there any way to check for this situation?
Hi,
Locks are not logged, they are very ephemeral in nature.
I included DYNAMICS.dbo.taDEXLOCKS for information, it is what is used internally by eConnect to lock objects, not something you need to get into yourself, but interesting for those that want to know what is going on "under the cover".
Tim.
Tim, is there any way to see historical locks? The import runs at 9:15am each morning. This has only happened twice since the beginning of the year. Is there any documentation on the use of DYNAMICS.dbo.taDEXLOCKS? I do not see it in the eConnect node list.
Timeouts can happen for so many reasons, its just the nature of SQL database in production environment with many users doing all kinds of stuff.
If you have an import using eConnect, then it is up to you as the developer how to handle errors arising from eConnect requests.
Where I'm using eConnect, I code it to retry like 30secs/1min after a timeout, then have a time squared back off rule, where I try less and less often to get the transaction to submit, then raise error after a threshold number of re-tries or time trying. If the SQL server has locked up, you really don't want to be adding more stress with your transactions, hence the backing off.
If the order is locked because a user is in that record (concurrency issues), econnect will see the lock record in tempdb..DEX_LOCK and then raise an econnect error 2079 Document is currently being edited by another user. That is different to timeout.
Note that econnect will also lock the order using DYNAMICS.dbo.taDEXLOCKS procedure, so no one else can edit while eConnect is editing, its a good responsible database citizen.
If you are seeing a lot of time outs it might be worth getting into a SQL server health check project. Set some extended event session in SQL to monitor for session time outs and another for deadlocks. Do the normal checking indexes are healthy and SQL stats up to date etc etc.
Tim
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator