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

BUG: fhircrack fhir_search function gets stuck #126

Closed
esalehi92 opened this issue Sep 27, 2022 · 4 comments
Closed

BUG: fhircrack fhir_search function gets stuck #126

esalehi92 opened this issue Sep 27, 2022 · 4 comments
Assignees

Comments

@esalehi92
Copy link

Hi,
I am currently trying to run a R-script on our Blaze-fhir-server but the script gets stuck when running the fhir_search function from fhircrackr library.

I testet it with simple queries and it works when only one condition is applied (e.g. icd-code = E84.0) but with more complex queries, it gets stuck (see screenshot below).
fhir-protected2

and if I cancel the run via Ctrl+C, the error below is shown:
fhir-protected

I'd appreciate any help! Thank you

@palmjulia
Copy link
Collaborator

Hi, thanks for reporting. The error that's shown when you cancel is fine, I think that's just what happens when the curl request is canceld before there's a proper answer from the server.

Have you tried your request outside of R? That would be the first check, copy the request you're giving to fhir_search() into either a webbrowser or Postman (if you're using that) and let me know if you get back a bundle there. Thanks!

@palmjulia palmjulia self-assigned this Sep 27, 2022
@esalehi92
Copy link
Author

esalehi92 commented Sep 27, 2022

Hi, thank you for the quick response!
Yes, you were right.
The same query cannot be run via curl.
But isn't there any timeout option or something similar to get a feedback if the query is not doing anything? Because there are different scenarios that it gets stuck! For example, for the same query that works, if I increase the number of counts and/or bundles, it also gets stuck in between!
look at the query and result in screenshots

fhir4
fhir3
It gets stuck in the middle! Can it be a performance issue? or maybe it is curling something that doesn't exist?
Thanks a lot!

@palmjulia
Copy link
Collaborator

Okay, but you are still inside R here, at least in the screenshot. You did try it outside of R though via curl in a shell or something like that, correct?

Because if the same problem occurs outside of R it's not really a fhircrackr bug, there's something wrong with your blaze server and I would advise making contact with Alexander Kiel to figure it out.

You are right though that it is weird the program isn't interrupting at some point. For starters, I would expect the server to send a time out message after some time. At least ours does.
And then of course curl should have its default connect time out parameter which should at some point stop the request. You can try setting this manually just to be sure at the start of you R session with httr::set_config(httr::config(connecttimeout = 30)) (this should in theory cause a timeout after 30 seconds of no server response.

@esalehi92
Copy link
Author

Thank you for the help. It was neither a problem of fhircrackr nor R. There were performance bottlenecks causing it.

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

2 participants