OHDSI Home | Forums | Wiki | Github

Error when running CohortDiagnostics::runCohortDiagnostics - An I/O error occurred while sending to the backend

What could the problem be? It looks like it is JDBC again.

Could it be Java PostgreSQL error on large query: An I/O error occurred while sending to the backend - Stack Overflow

?

DBMS:
postgresql

Error:
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.

SQL:
CREATE TEMP TABLE concept_counts

AS
SELECT
concept_id,
concept_count,
concept_subjects

FROM
(
SELECT condition_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.condition_occurrence
GROUP BY condition_concept_id

UNION ALL

SELECT condition_source_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.condition_occurrence
GROUP BY condition_source_concept_id

UNION ALL

SELECT drug_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.drug_exposure
GROUP BY drug_concept_id

UNION ALL

SELECT drug_source_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.drug_exposure
GROUP BY drug_source_concept_id

UNION ALL

SELECT procedure_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.procedure_occurrence
GROUP BY procedure_concept_id

UNION ALL

SELECT procedure_source_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.procedure_occurrence
GROUP BY procedure_source_concept_id

UNION ALL

SELECT measurement_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.measurement
GROUP BY measurement_concept_id

UNION ALL

SELECT measurement_source_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.measurement
GROUP BY measurement_source_concept_id

UNION ALL

SELECT observation_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.observation
GROUP BY observation_concept_id

UNION ALL

SELECT observation_source_concept_id AS concept_id,
COUNT(*) AS concept_count,
COUNT(DISTINCT person_id) AS concept_subjects
FROM ohdsiv5_june2021_thin.observation
GROUP BY observation_source_concept_id
) tmp

R version:
R version 4.0.5 (2021-03-31)

Platform:
x86_64-w64-mingw32

Attached base packages:

  • stats
  • graphics
  • grDevices
  • utils
  • datasets
  • methods
  • base
t