Skip to content

Queries with large result sets and multiple _revinclude parameters result in Internal server error #2950

Open
@klimkjar

Description

@klimkjar

Describe the bug
When performing a search with more than one _revinclude search parameter and _count set to a largish value (on our server anything 100 or above seems to be enough), the server returns 500 Internal server error. Reproduced in two of our testing environments with different datasets.

The exception in the AI logs states 'The count must be greater than zero.' A stack trace is attached.

FHIR Version?
R4

Data provider?
CosmosDB

To Reproduce
Steps to reproduce the behavior:

  1. Perform a search as described, for instance /Practitioner/?_count=1000&_revinclude=Contract:subject&_revinclude=Person:practitioner

Expected behavior
The server returns a set of search result, marked as Incomplete if all of the _revinclude data is not present. When only a single _revinclude statement is used, this is the behavior we see.

Actual behavior
The server returns 500 Internal server error

exception_stacktrace.txt

AB#98330

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions