FHIR icon indicating copy to clipboard operation
FHIR copied to clipboard

Add 'Retry-After' header in case of db locking / deadlock-related failures

Open lmsurpre opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Its possible to get deadlock issues (especially during parallel batch/bundle processing). Currently that results in a 500 error and clients should retry.

Describe the solution you'd like Consider adding something more explicit about whether/when the client should retry. For example, if we can return 503 instead of 500, we could include a Retry-After header in the response.

Describe alternatives you've considered

Acceptance Criteria

  1. GIVEN [a precondition] AND [another precondition] WHEN [test step] AND [test step] THEN [verification step] AND [verification step]

Additional context Maybe update our client to automatically retry in this case as well?

lmsurpre avatar Aug 30 '22 13:08 lmsurpre

Probably send some random time (random backoff) with configurability (min/max/average?)

lmsurpre avatar Nov 02 '22 12:11 lmsurpre