sde_logfile_data duplicate key error

3544
11
03-18-2014 05:53 AM
MarkWebb
New Contributor II
Greetings,

I am running ArcGIS Server 10 on Linux using PostgreSQL 9.0.  Every time I try and update a feature service I get an error in ArcGIS Server that only says "A database error occurred.".  I looked at the PostgreSQL log files and found the following log entry:

ERROR: duplicate key value violates unique constraint "sde_logfile_data_pk"
DETAIL: Key (logfile_data_id, sde_row_id)=(23432, 686) already exists.
STATEMENT: INSERT INTO sde.sde_logfile_data (logfile_data_id,sde_row_id) VALUES (23432, $1)

These 3 lines show up numerous times and I am not sure how to fix this.  The feature service was running fine for a while, as there are over 1000 features currently in the database.  So I know things were OK for a while. 

Thanks,
Mark
0 Kudos
11 Replies
WilliamCraft
MVP Regular Contributor
If there is only one connection at a time, then I have no idea why you'd be getting that error no matter how your log files are configured.  Vince is right... you need to contact Esri technical support to sort this out.  Sorry I couldn't be of assistance.
0 Kudos
VinceAngelo
Esri Esteemed Contributor
The logfile mechanism should work, even if you connect multiple times with the same user.
This is not a generic problem (it's a potential bottleneck, which is why session logfiles exist,
but this is not something that fails with duplicate keys on a regular basis).

Using the SDE user for data and connections is very bad, and exposes the potential to
destroy the geodatabase casually, but this should not cause this error either.

I don't know that the error will go away, because I could never create the error in the
first place.  I think there's a serious flaw in the PostgreSQL configuration, and that this
must be addressed while trying to resolve the logfile corruption. 

Given the complications of running services as SDE, the best solution would be to implement
best practices (start from scratch in a new database, using multiple users, with tablespaces
to store user data, and using roles to manage non-owner data access), THEN review
logfile functionality.

- V
0 Kudos