Select to view content in your preferred language

Geodatabase Exception on Search() from ArcGIS Core Host Application

441
3
Jump to solution
04-29-2025 10:03 AM
AbigailCharbonneau
Emerging Contributor

I have a custom Core Host application built for use with ArcGIS Pro 2.9.8 and Enterprise 10.9.1. It's scheduled to run on a nightly basis as job on a server, under admin credentials and it's creating a new branch version to run within each night. The premise of the job is to search for active services created by an external but integrated asset management system, that were placed in a default location and use pre-defined mapping criteria, to map those services to their proper addresses by placing a new service tee and moving the existing geometry for the service line to the new location.

I have not had problems with my application in the past, but recently the job has started to fail out when calling the Search() method on the pipeline line feature class part of our Utility Network (version 5). I receive a general geodatabase exception: 

ArcGIS.Core.Data.GeodatabaseGeneralException: 'Must be the owner to do this operation.' COMException: Exception from HRESULT: 0x80040217

The search method is taking in a spatial query and a false setting on the useRecyclingCursor parameter. When I pass in the same envelope and filter criteria (active lifecyclestatus) used in the Core Host app to the REST endpoint for the pipeline line feature class, I get back 1878 results, but when I try to set my row cursor equal to the search results in my application, I get the gdb exception when running. The data source connection is established as a web geodatabase with the service URL to the Utility Network within the application. Running under the UN owner credentials instead of the usual admin account for jobs, results in the same GDB exception. 

 Any thoughts on what might be going wrong/how to resolve this exception?

0 Kudos
1 Solution

Accepted Solutions
AbigailCharbonneau
Emerging Contributor

The error was a bit deceiving. After filing a case and working with an ESRI rep, it seems as though I'm encountering the same issue described in this post: https://community.esri.com/t5/arcgis-pro-sdk-questions/corehost-featureclass-search-3-minute-timeout...

The Pro SDK has a timeout of 3 minutes and the Search method is taking longer than that to get the response back which is causing this geodatabase exception. At 3.3 it seems as though the error message has changed to 'A general geodatabase exception has occurred' instead of 'you must be the owner to do this operation.' 

It does not seem to be an issue with the Core Host app itself, rather the performance of my feature services/response time on the queries being made against them. My production environment is the only environment in which performance is good. I've done testing against the REST endpoint with the same parameters used by my Core Host app, and my lower environments take several minutes to return the results. However, the REST API doesn't have the same timeout limitations as the Pro SDK, that's why I still eventually do get the results. 

I'll be moving forward with another ESRI case to examine my setup and help troubleshoot the performance issues seen when querying. It should not take more than 5 minutes to return 10 object ids, and currently it is taking that long in my lower environment. 

View solution in original post

0 Kudos
3 Replies
Aashis
by Esri Contributor
Esri Contributor

Did you update the server? What caused the script to fail suddenly?

0 Kudos
AbigailCharbonneau
Emerging Contributor

It works on our production server and does not work on our lower environment server. The only updates to the servers that I am aware of, are the standard Microsoft and Windows patches that are installed monthly. There have not been any enterprise patches installed recently or updates made to the script's code. I did try copying the production code to the lower env server and running it and that did not work. I also cannot run against the lower env on my local dev machine. 

0 Kudos
AbigailCharbonneau
Emerging Contributor

The error was a bit deceiving. After filing a case and working with an ESRI rep, it seems as though I'm encountering the same issue described in this post: https://community.esri.com/t5/arcgis-pro-sdk-questions/corehost-featureclass-search-3-minute-timeout...

The Pro SDK has a timeout of 3 minutes and the Search method is taking longer than that to get the response back which is causing this geodatabase exception. At 3.3 it seems as though the error message has changed to 'A general geodatabase exception has occurred' instead of 'you must be the owner to do this operation.' 

It does not seem to be an issue with the Core Host app itself, rather the performance of my feature services/response time on the queries being made against them. My production environment is the only environment in which performance is good. I've done testing against the REST endpoint with the same parameters used by my Core Host app, and my lower environments take several minutes to return the results. However, the REST API doesn't have the same timeout limitations as the Pro SDK, that's why I still eventually do get the results. 

I'll be moving forward with another ESRI case to examine my setup and help troubleshoot the performance issues seen when querying. It should not take more than 5 minutes to return 10 object ids, and currently it is taking that long in my lower environment. 

0 Kudos