Hi - we're using the Web API to sync assets with our website. We have a large sync backlog, and we're finding that the call to "Search_GetAssetIDsOnly", with a criteria of "Accession-Id" "OpExists" is returning an empty set if we request all results by specifying MaxHits to be "0". This request also returns an empty set for MaxHits set to larger numbers, such as "20000". If we set the MaxHits to be something small, such as "10", then we get results, so we know that the request is processing and returning results, and that there are in fact assets that meet this criteria. Here is the SOAP request we're using:<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope"> <Body> <Search_GetAssetIDsOnly xmlns="http://www.mediabin.com"> <!-- Optional --> <criteria> <mContainerID>{1D234D53-DD48-43FD-88B1-BD648BAF27C9}</mContainerID> <mAssetID></mAssetID> <mRecursive>true</mRecursive> <mSearchConstraints> <MBSearchConstraint> <mMetadata> <mID>{F7DBA04F-1C53-4D7D-A82F-4E6E59D86608}</mID> <mName>Accession-ID</mName> </mMetadata> <mSearchOperator>OpExists</mSearchOperator> <mBooleanOperator>NotSet</mBooleanOperator> </MBSearchConstraint> </mSearchConstraints> <mMaxHits>0</mMaxHits> </criteria> </Search_GetAssetIDsOnly> </Body></Envelope>We believe this behavior is being caused by a timeout at the App server level, which is being caught and handled silently at the web service. Regardless of our conjectures, we need to understand how to get our result set successfully.
Why are you using the legacy Web Service to perform a search? The performance using the VirageMediaBinService Web Service API will be significantly faster.
if there are timeouts occuring you should be able to see evidence in the server logs related to the database calls. If you are seeing issues there, you should probably consult your DBA regarding the health of the database as it likely needs some tuning. There may be additional indexes that should be created or there may be memory or IO pressure.
<script src="/q/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=3.2" type="text/javascript"></script>
My client is the DBA and he reviewed the query performance at the sql server. executing the query directly on the server results in 50,000+ records, and the query itself returns in under 1 second (streaming the results recordset takes perhaps another full second). I am *100%* certain that the database is *not* the bottleneck in this scenario.
Regarding the use of the legacy Web Service -- they're working with a Drupal module that was built on this web service, so we either have to rewrite the module from scratch, or make this work. To date, our hope was that making this work would be an option.
Any other idea?
What investigation have you done so far? Are all logs enabled? What do the logs say? What version of MediaBin is this? What query was run agianst the database and is it the same query executed by MediaBin; how did you confirm this?