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

Make cds-hooks callback timeout configurable #472

Closed
mattStorer opened this issue Feb 28, 2022 · 2 comments
Closed

Make cds-hooks callback timeout configurable #472

mattStorer opened this issue Feb 28, 2022 · 2 comments
Labels
cds-hooks Cds-hooks implementation enhancement New feature or request

Comments

@mattStorer
Copy link

cqf-ruler is blowing out with SocketTimeoutExceptions attempting to execute long queries against a FHIR server. there needs to be a way to extend this timeout via configuration file or command line argument to prevent this from happening.

2022-02-17 10:31:38.422 [Thread-4] DEBUG e.o.c.coach.cqfruler.CDSHookExecutor [CDSHookExecutor.java:194] got response code=500, body=ERROR: Exception in CQL Execution.Unexpected exception caught during execution: ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException: Failed to parse response from server when performing GET to URL https://[OUR FHIR SERVER]/Condition?subject=[REDACTED]&category=http%3A%2F%2Fterminology.hl7.org%2FCodeSystem%2Fcondition-category%7Cencounter-diagnosis - java.net.SocketTimeoutException: Read timed outorg.opencds.cqf.cql.engine.exception.CqlException: Unexpected exception caught during execution: ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException: Failed to parse response from server when performing GET to URL https://[OUR FHIR SERVER]/Condition?subject=[REDACTED]&category=http%3A%2F%2Fterminology.hl7.org%2FCodeSystem%2Fcondition-category%7Cencounter-diagnosis - java.net.SocketTimeoutException: Read timed out
at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:37)
at org.opencds.cqf.cql.engine.elm.execution.FunctionRefEvaluator.internalEvaluate(FunctionRefEvaluator.java:17)
at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18)

@JPercival JPercival added enhancement New feature or request cds-hooks Cds-hooks implementation 2 labels Mar 1, 2022
@JPercival
Copy link
Contributor

Here's where the callback client is set up:

https://github.com/DBCG/cqf-ruler/blob/master/plugin/cds-hooks/src/main/java/org/opencds/cqf/ruler/cdshooks/evaluation/EvaluationContext.java#L168

What we need to do is add some properties to the cds-hooks config class here:

https://github.com/DBCG/cqf-ruler/blob/master/plugin/cds-hooks/src/main/java/org/opencds/cqf/ruler/cdshooks/CdsHooksProperties.java

And then pass that configuration down through the evaluation context so that the timeout can be set.

@JPercival JPercival changed the title cqf-ruler throwing SocketTimeoutExceptions making calls to FHIR server Make cds-hooks callback timeout configurable Mar 1, 2022
@JPercival
Copy link
Contributor

Duplicated by #526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cds-hooks Cds-hooks implementation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants