Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search crashing instead of paginating #162

Open
pendletons opened this issue Apr 18, 2024 · 0 comments
Open

Search crashing instead of paginating #162

pendletons opened this issue Apr 18, 2024 · 0 comments

Comments

@pendletons
Copy link

Hi,

I'm trying to search for appointment slots for a given order, and contrary to what the docs claim, pagination does not seem to be happening. If I search for a 1-day window of slots, I get 165 results back. If I search for any larger window, my server runs out of memory (it has 2GB allocated) and the process is killed.

Success:

irb(main):011:0> results= FHIR::STU3::Slot.search('_query' => 'SearchSlotForOrder', 'order' => '1758991', start: (Date.today + 1.day).to_s, end: (Date.today + 2.days).to_s)
I, [2024-04-18T10:05:46.570374 #10169]  INFO -- : GETTING: http://<server>/Slot?_query=SearchSlotForOrder&end=2024-04-20&order=1758991&start=2024-04-19
=> 
#<FHIR::STU3::Bundle:0x00007fdf9bc394c0
...
irb(main):012:0> results.total
=> 165
irb(main):012:0> results.next_bundle
=> nil

Failure:

irb(main):013:0> results= FHIR::STU3::Slot.search('_query' => 'SearchSlotForOrder', 'order' => '1758991', start: (Date.today + 1.day).to_s, end: (Date.today + 3.days).to_s)
I, [2024-04-18T10:01:37.394239 #8541]  INFO -- : GETTING: http://<server>/Slot?_query=SearchSlotForOrder&end=2024-04-21&order=1758991&start=2024-04-19
Killed

Is there a way to limit a bundle size (165+ seems large for pagination), and how do I actually force pagination to happen, since it doesn't seem to be happening here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant