<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic sde_logfile_data duplicate key error in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711907#M40285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running ArcGIS Server 10 on Linux using PostgreSQL 9.0.&amp;nbsp; Every time I try and update a feature service I get an error in ArcGIS Server that only says "A database error occurred.".&amp;nbsp; I looked at the PostgreSQL log files and found the following log entry:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR: duplicate key value violates unique constraint "sde_logfile_data_pk"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DETAIL: Key (logfile_data_id, sde_row_id)=(23432, 686) already exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STATEMENT: INSERT INTO sde.sde_logfile_data (logfile_data_id,sde_row_id) VALUES (23432, $1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These 3 lines show up numerous times and I am not sure how to fix this.&amp;nbsp; The feature service was running fine for a while, as there are over 1000 features currently in the database.&amp;nbsp; So I know things were OK for a while.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2014 12:53:34 GMT</pubDate>
    <dc:creator>MarkWebb</dc:creator>
    <dc:date>2014-03-18T12:53:34Z</dc:date>
    <item>
      <title>sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711907#M40285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running ArcGIS Server 10 on Linux using PostgreSQL 9.0.&amp;nbsp; Every time I try and update a feature service I get an error in ArcGIS Server that only says "A database error occurred.".&amp;nbsp; I looked at the PostgreSQL log files and found the following log entry:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR: duplicate key value violates unique constraint "sde_logfile_data_pk"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DETAIL: Key (logfile_data_id, sde_row_id)=(23432, 686) already exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STATEMENT: INSERT INTO sde.sde_logfile_data (logfile_data_id,sde_row_id) VALUES (23432, $1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These 3 lines show up numerous times and I am not sure how to fix this.&amp;nbsp; The feature service was running fine for a while, as there are over 1000 features currently in the database.&amp;nbsp; So I know things were OK for a while.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 12:53:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711907#M40285</guid>
      <dc:creator>MarkWebb</dc:creator>
      <dc:date>2014-03-18T12:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711908#M40286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Greetings,&lt;BR /&gt;&lt;BR /&gt;I am running ArcGIS Server 10 on Linux using PostgreSQL 9.0.&amp;nbsp; Every time I try and update a feature service I get an error in ArcGIS Server that only says "A database error occurred.".&amp;nbsp; I looked at the PostgreSQL log files and found the following log entry:&lt;BR /&gt;&lt;BR /&gt;ERROR: duplicate key value violates unique constraint "sde_logfile_data_pk"&lt;BR /&gt;DETAIL: Key (logfile_data_id, sde_row_id)=(23432, 686) already exists.&lt;BR /&gt;STATEMENT: INSERT INTO sde.sde_logfile_data (logfile_data_id,sde_row_id) VALUES (23432, $1)&lt;BR /&gt;&lt;BR /&gt;These 3 lines show up numerous times and I am not sure how to fix this.&amp;nbsp; The feature service was running fine for a while, as there are over 1000 features currently in the database.&amp;nbsp; So I know things were OK for a while.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mark&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like something got hosed up with your SDE_LOGFILE_DATA table, which is one of the tables involved when you make a selection of 1,000 or more features using a geodatabase connection.&amp;nbsp; While not necessarily common of an error, I can't say that I'm surprised because I've seen issues before with the cleanup of rows in that table by ArcSDE.&amp;nbsp; In my mind, there is a short-term fix and a long-term fix to this issue.&amp;nbsp; I know you're using Postgres, but I'm not as familiar with that RDBMS so I'm going to provide an Oracle-based solution.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The short-term fix is to truncate &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;both &lt;/SPAN&gt;&lt;SPAN&gt; the SDE_LOGFILE_DATA and the SDE_LOGFILES tables and start over with your session: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;TRUNCATE TABLE SDE.SDE_LOGFILES;
TRUNCATE TABLE SDE.SDE_LOGFILE_DATA;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The long-term fix is to drop those tables altogether and re-create them as Global Temporary tables (or the equivalent in Postgres):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;DROP TABLE SDE.SDE_LOGFILE_DATA CASCADE CONSTRAINTS;
DROP TABLE SDE.SDE_LOGFILES CASCADE CONSTRAINTS;

CREATE GLOBAL TEMPORARY TABLE SDE.SDE_LOGFILE_DATA
&amp;nbsp;&amp;nbsp; (
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_data_id NUMBER(*,0) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; sde_row_id NUMBER(*,0) NOT NULL ENABLE
&amp;nbsp;&amp;nbsp; )
ON COMMIT PRESERVE ROWS
/
CREATE INDEX SDE.SDE_LOGFILE_DATA_IDX1
&amp;nbsp;&amp;nbsp;&amp;nbsp; ON SDE.SDE_LOGFILE_DATA(LOGFILE_DATA_ID,SDE_ROW_ID)
/
CREATE INDEX SDE.SDE_LOGFILE_DATA_IDX2
&amp;nbsp;&amp;nbsp;&amp;nbsp; ON SDE.SDE_LOGFILE_DATA(SDE_ROW_ID)
/
GRANT DELETE ON SDE.SDE_LOGFILE_DATA TO SDE
/
CREATE GLOBAL TEMPORARY TABLE SDE.SDE_LOGFILES
&amp;nbsp; (
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_name VARCHAR2(256) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_id NUMBER(*,0) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_data_id NUMBER(*,0) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; registration_id NUMBER(*,0) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; flags NUMBER(*,0) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; session_tag NUMBER(*,0) NOT NULL ENABLE,
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_data_db VARCHAR2(32),
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_data_owner VARCHAR2(32),
&amp;nbsp;&amp;nbsp;&amp;nbsp; logfile_data_table VARCHAR2(98),
&amp;nbsp;&amp;nbsp;&amp;nbsp; column_name NVARCHAR2(32)
&amp;nbsp;&amp;nbsp; )
ON COMMIT PRESERVE ROWS
/
CREATE UNIQUE INDEX SDE.SDE_LOGFILES_PK
&amp;nbsp;&amp;nbsp;&amp;nbsp; ON SDE.SDE_LOGFILES(LOGFILE_ID)
/
CREATE UNIQUE INDEX SDE.SDE_LOGFILS_UK
&amp;nbsp;&amp;nbsp;&amp;nbsp; ON SDE.SDE_LOGFILES(LOGFILE_NAME)
/
CREATE UNIQUE INDEX SDE.SDE_LOGFILES_UK2
&amp;nbsp;&amp;nbsp;&amp;nbsp; ON SDE.SDE_LOGFILES(LOGFILE_DATA_ID)
/
GRANT DELETE ON SDE.SDE_LOGFILES TO SDE
/&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oracle Global Temporary tables, by definition, will truncate themselves when the user disconnects its session.&amp;nbsp; I believe there may be an equivalent type of table Postgres.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711908#M40286</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2021-12-12T06:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711909#M40287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for getting back to me.&amp;nbsp; I am using a PostgreSQL 9.0 database.&amp;nbsp; It was an EnterpriseDB install on a linux machine.&amp;nbsp; Will these same steps work, just changing the SQL syntax possibly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 14:24:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711909#M40287</guid>
      <dc:creator>MarkWebb</dc:creator>
      <dc:date>2014-03-18T14:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711910#M40288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is probably an issue for Tech Support, but you can clear the issue by truncating&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the logfile table pair (which will require that no one be logged in as the owner).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that "Best Practice" dictates that you should &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;NEVER&lt;/SPAN&gt;&lt;SPAN&gt; use the SDE user to own&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spatial data, and you should only connect as SDE if you are doing geodatabase&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;maintenance.&amp;nbsp; Instead you should always create additional users to own and manage&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spatial data, and also create non-owner users for managing access to the spatial&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data.&amp;nbsp; Permissions should be granted through roles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 14:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711910#M40288</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2014-03-18T14:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711911#M40289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for getting back to me.&amp;nbsp; I am using a PostgreSQL 9.0 database.&amp;nbsp; It was an EnterpriseDB install on a linux machine.&amp;nbsp; Will these same steps work, just changing the SQL syntax possibly?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had modified my comments above right before you posted this comment.&amp;nbsp; But, after some further review, I believe I was slightly off course with regard to the global temp tables in Postgres.&amp;nbsp; In Postgres, all temp tables will be accessible only to that session and will be deleted when that session is closed. You can have the GLOBAL in the CREATE TABLE statement as I described above but it will be ignored by the database.&amp;nbsp; Postgres requires each &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;session &lt;/SPAN&gt;&lt;SPAN&gt;to issue its own CREATE TEMPORARY TABLE command for each temporary table to be used, thus creating the temp table "on the fly" rather than ahead of time.&amp;nbsp; I apologize for mentioning the long-term solution above since it likely won't work for Postgres.&amp;nbsp; That being said, you can go with the short-term solution I mentioned above for truncating the tables (which Vince also seems to suggest) and see if that fixes your problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 14:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711911#M40289</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2014-03-18T14:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711912#M40290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I truncated (cascade) both the sde_logfile_data and sde_logfiles tables.&amp;nbsp; I then restarted PostgreSQL, GeoEvent Processor and ArcGIS Server I still get the same errors.&amp;nbsp; The ID's that are shown in the logs are different but otherwise its the same errors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 17:07:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711912#M40290</guid>
      <dc:creator>MarkWebb</dc:creator>
      <dc:date>2014-03-18T17:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711913#M40291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think what is happening is that there are multiple connections to your service using the same database user account, and each of those sessions (connections) are trying to select some of the same records and insert them into the same logfile tables.&amp;nbsp; What you need to do is change your ArcSDE configuration to utilize session-based Logfiles.&amp;nbsp; My guess is that you are using the Shared logfile configuration, which is the default for Postgres databases.&amp;nbsp; Session-based logfiles are dedicated to a single session (rather than a specific user account) and may contain multiple selection sets (log files).&amp;nbsp; Each session that logs in requires a set of tables for selections.&amp;nbsp; You should use session-based log files if you have numerous concurrent connections being made to the geodatabase with the same login / user account.&amp;nbsp; You'll likely want non-pooled session-based logfiles, to be more specific.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following links describe the various ways of configuring how logfiles are handled in ArcSDE (e.g., Shared vs. Session-Based vs. Stand-Alone):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.esri.com/help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Log_file_table_configuration_options_for_geodatabases_in_PostgreSQL/002p0000001q000000"&gt;help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Log_file_table_configuration_options_for_geodatabases_in_PostgreSQL/002p0000001q000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Log_file_tables/002p00000081000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Log_file_tables/002p00000081000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:03:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711913#M40291</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2014-03-18T18:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711914#M40292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The session ids should be different between logins, so this error should not be possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is some characteristic of your install which is causing this error to recur.&amp;nbsp; I suggest&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you contact Tech Support, so they can try to discover the root problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711914#M40292</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2014-03-18T18:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711915#M40293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The session ids should be different between logins, so this error should not be possible.&lt;BR /&gt;There is some characteristic of your install which is causing this error to recur.&amp;nbsp; I suggest&lt;BR /&gt;you contact Tech Support, so they can try to discover the root problem.&lt;BR /&gt;&lt;BR /&gt;- V&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vince, what I'm saying is that Shared log files are shared by all sessions that connect as the same user which might very well be the case here.&amp;nbsp; If you have multiple users connecting with the same user account, all those sessions insert records into the same log file data table.&amp;nbsp; The session IDs being different wouldn't matter, I don't think, because it's irrespective of session ID.&amp;nbsp; For Session-based log files, these are dedicated to a single session and that is where the session ID comes into play.&amp;nbsp; I think he is currently set up with Shared log files and the connections to his feature service all use the SDE account.&amp;nbsp; I might be misunderstanding you altogether, but I think if he switches to Session-based log files then this error would go away.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:24:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711915#M40293</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2014-03-18T18:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711916#M40294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm new to ArcGIS Server / Geodatabases, so I'm sorry this has been a mess.&amp;nbsp; All I am trying to do is receive a data feed using GeoEvent Processor and update a Feature Class in ArcGIS Server.&amp;nbsp; Here's my data flow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JSON Data -&amp;gt; GeoEvent Processor -&amp;gt; Update Feature Service -&amp;gt; Query information in ArcGIS Server via REST&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I'm not sure where the multiple database connections are coming from, if GEP is pooling connections or something else.&amp;nbsp; Since GEP is just doing a REST push to ArcGIS Server there is no connections to the DB other than ArcGIS Server.&amp;nbsp; I followed the instructions at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Log_file_table_configuration_options_for_geodatabases_in_PostgreSQL/002p0000001q000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Log_file_table_configuration_options_for_geodatabases_in_PostgreSQL/002p0000001q000000/&lt;/A&gt;&lt;SPAN&gt; and changed the value of ALLOWSESSIONLOGFILE to 1.&amp;nbsp; The other 2 values that were suggested that I change were already set to the values specified in the link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After updating ALLOWSESSIONLOGFILE, I restarted ArcGIS Server, PostgreSQL and GeoEvent Processor.&amp;nbsp; I am still getting an error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR: duplicate key value violates unique contraint 'sde_session_pk305'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DETAIL: Key (logfile_data_id, sde_row_id)=(24140,899) already exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STATEMENT: INSERT INTO sde.sde_session305 (logfile_data_id,sde_row_id) VALUES (24140, $1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the continued support,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:55:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711916#M40294</guid>
      <dc:creator>MarkWebb</dc:creator>
      <dc:date>2014-03-18T18:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711917#M40295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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.&amp;nbsp; Vince is right... you need to contact Esri technical support to sort this out.&amp;nbsp; Sorry I couldn't be of assistance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:58:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711917#M40295</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2014-03-18T18:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: sde_logfile_data duplicate key error</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711918#M40296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The logfile mechanism should work, even if you connect multiple times with the same user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is not a generic problem (it's a potential bottleneck, which is why session logfiles exist,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but this is not something that fails with duplicate keys on a regular basis).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the SDE user for data and connections is very bad, and exposes the potential to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;destroy the geodatabase casually, but this should not cause this error either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know that the error will go away, because I could never create the error in the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;first place.&amp;nbsp; I think there's a serious flaw in the PostgreSQL configuration, and that this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;must be addressed while trying to resolve the logfile corruption.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Given the complications of running services as SDE, the best solution would be to implement&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;best practices (start from scratch in a new database, using multiple users, with tablespaces&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to store user data, and using roles to manage non-owner data access), THEN review&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;logfile functionality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 19:14:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-logfile-data-duplicate-key-error/m-p/711918#M40296</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2014-03-18T19:14:34Z</dc:date>
    </item>
  </channel>
</rss>

