OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
126 stars 156 forks source link

Priority call causes application hang in initial load for ATLAS #2350

Closed fdefalco closed 1 month ago

fdefalco commented 4 months ago

Expected behavior

WebAPI responds or async handles requests for data source priority during initial application loading.

Actual behavior

WebAPI will block until a 'select 1' is executed against all data sources configured. This is problematic in cases where database platforms have idle/standby modes where upon receiving a query they take several minutes to initialize before being able to respond to the query. (ie, databricks, redshift serverless, spark serverless)

image

This check connection appears to be the cause of the issue: https://github.com/OHDSI/WebAPI/blob/master/src/main/java/org/ohdsi/webapi/source/SourceService.java#L108

For responding to priority it might be better to only make use of the data in the daimon tables without performing a connection test.

anthonysena commented 1 month ago

Closed via #2374