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

Timeout calling external APIs #346

Open
jas88 opened this issue May 3, 2023 · 0 comments
Open

Timeout calling external APIs #346

jas88 opened this issue May 3, 2023 · 0 comments
Assignees

Comments

@jas88
Copy link
Member

jas88 commented May 3, 2023

Describe the bug

Currently RdmpDicom uses the default .Net timeout of 100 seconds on API calls to external servers such as SemEHR. This is too short for some queries, resulting in timeouts.

To Reproduce
Steps to reproduce the behavior:

  1. Perform longer-running API query

Expected behavior
Longer, configurable or no timeout applied: call should complete.

Screenshots
N/A

RDMP.Dicom Plugin Version

RDMP Version

Stack Trace

A task was canceled
at System. Threading.Tasks. Task.GetExceptions(Boolean includeTaskCanceledExceptions) at System. Threading. Tasks.Task.ThrowlfExceptional(Boolean includeTaskCanceledExceptions) at System. Threading. Tasks. Task'1.GetResultCore(Boolean waitCompletionNotification)
at Rdmp.Dicom.ExternalApis.SemEHRApiCaller.Run(AggregateConfigurationac,CachedAggregateConfigurationResultsManagercache,CancellationTokentoken,SemEHRConfigurationconfig)
at Rdmp.Dicom.ExternalApis.SemEHRApiCaller.Run(AggregateConfigurationac,CachedAggregateConfigurationResultsManagercache,CancellationTokentoken)
at Rdmp.Core.QueryBuilding.CohortQueryBuilderDependency.GetCacheFetchSqll/Possible(CohortQueryBuilderResultparent,AggregateConfigurationaggregate,CohortQueryBuilderDependencySqlsql,BooleanisPatientIndexTable,|PluginCohortCompilerpluginCohortCompiler.
Cancellation Token cancellation Token) in Da\ RDMP\RDMP\Rdmp.Core\QueryBuilding\CohortQuervBuilderDependency.cs:line267
at Rdmp.Core.QueryBuilding.CohortQueryBuilderDependency.Build(CohortQueryBuilderResultparent,ISq|Parameterilglobals,CancellationTokencancellationToken)inD:\a\RDMPIRDMPIRdmp.Core\QueryBuilding\CohortOueryBuilderDependency.csiline145 at Rdmp.Core.QueryBuilding.CohortOuervBuil derResult.BuildDependenciesSql(ISqlParameter(iglobals)inD:\a\RDMP\RDMP\Rdmp.Core\QueryBuildinq\CohortQuerBuilderResult.cs:line362 at Rdmp.Core.QueryBuilding.
•(AggregateConfiguration configuration. ParameterManager parameterManager
MP\Rdmp. Corel QueryBuildinq\ CohortQueryBuilderResult.cs:line 148
at Rdmp.Core.QuervBuilding.
= 176
at Rdmp.Core.CohortCreation at Rdmp.Core.CohortCreation. at Rdmp.Core.CohortCreation
ectlulloMatanaceTablerunnable Enumerable'1
askOnlv(|MapsDirectlyToDatabaseTabl
rderActivity Operation operation
sation\ Execution\ CohortCompiler.cs:line 32
Corel Cohort Creation\ Cohortidentification ConfigurationUICommon.c:line 204
Corel CohortCreation\
phoridentiticationContaurationCommon cane 187
at Rdmp.Core.CohortCreation.Cohortl
reationCohoricentiticationtons iration||ICommon ceiline 27°
at System.Threadina. FyecutionContext.RunF
preadPoolDispatchloon(Thread threadPoo!Thread EyecutionConteyt eyecutionContey
at System. Threading. Tasks. Task. ExecuteWith ThreadLocal(Task currentTaskSlot, Thread threadPoolThread) at System. Threading.ThreadPoo/WorkQueue. Dispatch
at Svstem.Threading.PortableThreadPool.WorkerThread.WorkerThreadStartO```

**Additional context**

Issue previously logged by eDRIS in EPCC Gitlab database, now transferred here to resolve.
@jas88 jas88 self-assigned this May 3, 2023
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