SAP Knowledge Base Article - Public

2990434 - Error: [COE0019][SNP]Snapshot lost for current pagination query, pls relaunch query and start from 1st page - OData API

Symptom

You're performing API queries to SuccessFactors OData API with snapshot pagination enabled and when requesting a page using the skiptoken, a response error message similar to these ones below are returned:

"[EXCEPTION] ODATA Execution Error Code: 500-COE_GENERAL_SERVER_FAILURE Internal Server Error-[COE0019][SNP]"

"[COE0019][SNP]Snapshot lost for current pagination query, pls relaunch query and start from 1st page."

Environment

  • SAP SuccessFactors HXM Suite
    • OData API

Cause

There are three possible causes for this error:

  1. The time interval between the last and the second-to-last page request has exceeded 15 minutes, and hence the snapshot data has expired in the cache server;
  2. Querying the last page of snapshot multiple times. After querying the last page, snapshot will be removed in the cache. If querying the last page again, the above mentioned issue will occur
  3. The cache service which keeps snapshot data is optimized for performance. On rare occasions, the cache server may discard snapshot data to avoid performance degradation, so there's no way to guarantee the snapshot will be available 100% of the time.

Resolution

Cause 1:

Please review your client application's design and ensure there aren't many processing steps between each page request which could lead to large time intervals between them. Reducing the query's page size may also help depending on the scenario.

Cause 2:

Please review the logic of your process and make sure it is not using the last skiptoken provided by the server more than once.

Cause 3:

For now this is a rare occurrence that may happen. If this is not acceptable, here are some workaround suggestions:

  1. Use another pagination method instead of snapshot pagination. Cursor-based pagination is the alternative server pagination method and is indicated for simple queries that don't apply any $filter or $orderby statement;
      
  2. If cursor-based pagination is not suited for your application, the only way to solve this would be retriggering the query again. So you could implement a retry mechanism on the client application to relaunch the query from the start when this error is received, or just manually re-run the interface that is sending the API queries.
    (we recommend the retry be performed within a new API session)

     
Please note that the SF Operations team is working internally to enhance the cache service, preventing the cause #3 mentioned above to happen. The internal codes for this change are API-28362 and API-28348, and was confirmed to be delivered with the Major Upgrade 2H 2023.

See Also

Help Portal: Snapshot-Based Pagination

Keywords

500-COE_GENERAL_SERVER_FAILURE, COE0019, SNP, 500 Internal Server Error, Snapshot lost for current pagination query, API-28362, API-28348 , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Suite all versions