SDE: deadlock detected

768
0
02-10-2012 06:45 AM
MichaelO_Donnell1
New Contributor II
Software: ArcSDE 10.0 SP3 via PostgreSQL 8.3
Platform: Windows 2008 R2, 64-bit

I have an application that is running in a distributed computing environment (i.e., a private cloud). The application makes a copy of a feature class (3 possible datasets in this case), and then runs numerous analyses based on additional parameters for a specific job. I have approximately 200 jobs that run concurrently and that are trying to access the same feature class. I have configured giomgr.def to handle session-based settings (because distributed computing relies on LDAP and in this case all jobs owned by single user; this is appropriate method according to ESRI documentation) and I increased the connections environment setting to 1000 concurrent connections (both found in giomgr.defs).

Problem: I am getting an error when these programs try to create a copy of the file and it seems there might be a setting that I could change to mitigate the problem.

Error message:
Underlying DBMS error [ERROR:  deadlock detected
DETAIL:  Process 2000 waits for ExclusiveLock on tuple (9,16) of relation 734480 of database 733778; blocked by process 9296.
Process 9296 waits for ShareLock on transaction 167421501; blocked by process 5064.
Process 5064 waits for ShareLock on transaction 167447659; blocked by process 2000.
CONTEXT:  SQL statement "UPDATE sde.GDB_TABLES_LAST_MODIFIED SET last_modified_count = last_modified_count + 1 WHERE table_name = 'GDB_ITEMRELATIONSHIPS'"
PL/pgSQL function "gdb_items_rel_tr_f] [prjras.sde.GDB_ItemRelationships]
DBMS table not found [prjras.pr.tmp_24a][STATE_ID = 0]
Failed to execute (CopyFeatures).
Failed at Tue Feb 07 10:31:51 2012 (Elapsed Time: 3 minutes 58 seconds)

Possible Solution/thoughts:
The problem may tied to my settings for postgreSQL.conf (described in SDE documentation) for the shared buffers and max_locks_per_transaction. ESRI documentation describes the shared_buffers as 16kb * number of max_connections and the max_locks_per_transaction represents the number of database objects that can be locked simultaneously. I have set shared_buffers to 25MB and max_locks_per_transaction to 500 (apparently the latter setting is not one-to-one but changing this is not helping).


thank you,
Mike
0 Kudos
0 Replies